ci(release): publish the public releases repository; fix signing and token conditions
The step conditions read step-level env, which a step's own if cannot see: signing never ran and every release went to this repository. Secrets now surface as job-level HAS_* flags. The publish job sets up .NET for make-icon, re-publishing a tag updates the existing release, the portable zip carries portable.txt, and tags are validated before anything is built. deploy/releases-repo holds the public README, EULA draft, SECURITY policy and issue forms; release.yml copies them with the Unraid template, compose file, screenshots, i18n and SHA256SUMS. The fixtures command reports missing samples as warning annotations (--allow-missing) instead of a silent pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
11 files changed
+588
-59
No files matched your search
@@ -64,10 +64,9 @@ jobs:
|
||||
if: runner.os == 'Windows'
|
||||
run: dotnet format whitespace Titano.slnx --verify-no-changes
|
||||
|
||||
# Missing samples become "RAW fixture missing" warning annotations; the tests that need them skip.
|
||||
- name: Fetch CC0 fixtures
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if dotnet "$TOOLS" --help | grep -q '^ fixtures'; then dotnet "$TOOLS" fixtures; fi
|
||||
run: dotnet "$TOOLS" fixtures --allow-missing
|
||||
|
||||
- name: Test · Core
|
||||
run: dotnet run --project tests/Titano.Core.Tests -c Release --no-build -- --junit out/junit/core.xml
|
||||
|
||||
+143
-45
@@ -1,5 +1,8 @@
|
||||
name: Release
|
||||
|
||||
# A tag vMAJOR.MINOR.PATCH[-PRERELEASE] builds, tests, signs (when certificates are configured) and publishes
|
||||
# everything (BRIEF §19.3): installers, portable and server zips, SHA256SUMS, release notes, the multi-arch server
|
||||
# image on GHCR, and the public releases repository content (BRIEF §19.4).
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
@@ -13,10 +16,15 @@ permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: release-${{ github.event.inputs.tag || github.ref_name }}
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: "1"
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
|
||||
# Public repository that receives releases (BRIEF §19.4). Override with the RELEASES_REPO variable.
|
||||
TOOLS: src/Titano.Tools/bin/Release/net10.0/Titano.Tools.dll
|
||||
# Public repository that receives releases (BRIEF §19.4). Override with the RELEASES_REPO repository variable.
|
||||
RELEASES_REPO: ${{ vars.RELEASES_REPO || format('{0}/titano-releases', github.repository_owner) }}
|
||||
|
||||
jobs:
|
||||
@@ -28,12 +36,19 @@ jobs:
|
||||
prerelease: ${{ steps.v.outputs.prerelease }}
|
||||
steps:
|
||||
- id: v
|
||||
env:
|
||||
TAG: ${{ github.event.inputs.tag || github.ref_name }}
|
||||
run: |
|
||||
tag="${{ github.event.inputs.tag || github.ref_name }}"
|
||||
version="${tag#v}"
|
||||
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
if [[ "$version" == *-* ]]; then echo "prerelease=true" >> "$GITHUB_OUTPUT"; else echo "prerelease=false" >> "$GITHUB_OUTPUT"; fi
|
||||
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]; then
|
||||
echo "::error title=Release::Tag '$TAG' is not vMAJOR.MINOR.PATCH or vMAJOR.MINOR.PATCH-PRERELEASE"
|
||||
exit 1
|
||||
fi
|
||||
version="${TAG#v}"
|
||||
{
|
||||
echo "tag=$TAG"
|
||||
echo "version=$version"
|
||||
if [[ "$version" == *-* ]]; then echo "prerelease=true"; else echo "prerelease=false"; fi
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
windows:
|
||||
needs: version
|
||||
@@ -43,6 +58,8 @@ jobs:
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: ${{ needs.version.outputs.version }}
|
||||
# Secrets cannot appear in step conditions: expose only whether signing is configured.
|
||||
HAS_SIGNING: ${{ secrets.SIGN_PFX_BASE64 != '' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -59,6 +76,15 @@ jobs:
|
||||
dotnet run --project "tests/Titano.$t.Tests" -c Release --no-build -- --junit "out/junit/$t.xml"
|
||||
done
|
||||
|
||||
- name: Screenshots for the public README
|
||||
continue-on-error: true
|
||||
run: |
|
||||
for exe in src/Titano.App/bin/Release/net10.0-windows/Titano.exe src/Titano.Uploader/bin/Release/net10.0-windows/Titano.Uploader.exe; do
|
||||
"$exe" --capture out/screenshots &
|
||||
wait $! || echo "::warning title=Screenshots::$(basename "$exe") --capture exited with $?"
|
||||
done
|
||||
ls out/screenshots
|
||||
|
||||
- name: Publish self-contained programs
|
||||
run: |
|
||||
common="-c Release -r win-x64 --self-contained -p:TitanoVersion=$VERSION -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=none"
|
||||
@@ -68,7 +94,7 @@ jobs:
|
||||
dotnet publish src/Titano.Setup/Titano.Setup.csproj $common -p:PublishReadyToRun=true -o out/publish/setup
|
||||
|
||||
- name: Sign binaries
|
||||
if: env.SIGN_PFX != ''
|
||||
if: env.HAS_SIGNING == 'true'
|
||||
env:
|
||||
SIGN_PFX: ${{ secrets.SIGN_PFX_BASE64 }}
|
||||
SIGN_PASSWORD: ${{ secrets.SIGN_PASSWORD }}
|
||||
@@ -76,27 +102,34 @@ jobs:
|
||||
run: |
|
||||
$pfx = Join-Path $env:RUNNER_TEMP "sign.pfx"
|
||||
[IO.File]::WriteAllBytes($pfx, [Convert]::FromBase64String($env:SIGN_PFX))
|
||||
$signtool = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object FullName -Descending | Select-Object -First 1
|
||||
Get-ChildItem out/publish -Recurse -Include *.exe | ForEach-Object {
|
||||
& $signtool.FullName sign /fd SHA256 /f $pfx /p $env:SIGN_PASSWORD /tr http://timestamp.digicert.com /td SHA256 $_.FullName
|
||||
if ($LASTEXITCODE -ne 0) { throw "signtool failed for $($_.FullName)" }
|
||||
try {
|
||||
$signtool = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object FullName -Descending | Select-Object -First 1
|
||||
if (-not $signtool) { throw "signtool.exe not found in the Windows SDK" }
|
||||
Get-ChildItem out/publish -Recurse -Include *.exe | ForEach-Object {
|
||||
& $signtool.FullName sign /fd SHA256 /f $pfx /p $env:SIGN_PASSWORD /tr http://timestamp.digicert.com /td SHA256 $_.FullName
|
||||
if ($LASTEXITCODE -ne 0) { throw "signtool failed for $($_.FullName)" }
|
||||
}
|
||||
} finally {
|
||||
Remove-Item $pfx -ErrorAction SilentlyContinue
|
||||
}
|
||||
Remove-Item $pfx
|
||||
|
||||
- name: Package installers and archives
|
||||
run: |
|
||||
mkdir -p out/release
|
||||
tools=src/Titano.Tools/bin/Release/net10.0/Titano.Tools.dll
|
||||
dotnet "$tools" pack-installer --setup out/publish/setup/Titano.Setup.exe --product Titano \
|
||||
dotnet "$TOOLS" pack-installer --setup out/publish/setup/Titano.Setup.exe --product Titano \
|
||||
--component "Titano=out/publish/app" --component "Uploader=out/publish/uploader" --component "Server=out/publish/server" \
|
||||
--version "$VERSION" --out "out/release/Titano-Setup-$VERSION.exe"
|
||||
dotnet "$tools" pack-installer --setup out/publish/setup/Titano.Setup.exe --product "Titano Uploader" \
|
||||
dotnet "$TOOLS" pack-installer --setup out/publish/setup/Titano.Setup.exe --product "Titano Uploader" \
|
||||
--component "Uploader=out/publish/uploader" --version "$VERSION" --out "out/release/Titano-Uploader-Setup-$VERSION.exe"
|
||||
(cd out/publish/server && 7z a -tzip "../../release/Titano-Server-win-x64-$VERSION.zip" . > /dev/null)
|
||||
(cd out/publish/app && 7z a -tzip "../../release/Titano-win-x64-portable-$VERSION.zip" . > /dev/null)
|
||||
# The portable build keeps its data next to Titano.exe because of portable.txt (never inside the installer).
|
||||
cp -R out/publish/app out/portable
|
||||
printf 'Titano portable mode: settings, index and logs are kept in the data folder next to Titano.exe.\r\n' > out/portable/portable.txt
|
||||
(cd out/portable && 7z a -tzip "../release/Titano-win-x64-portable-$VERSION.zip" . > /dev/null)
|
||||
ls -l out/release
|
||||
|
||||
- name: Sign installers
|
||||
if: env.SIGN_PFX != ''
|
||||
if: env.HAS_SIGNING == 'true'
|
||||
env:
|
||||
SIGN_PFX: ${{ secrets.SIGN_PFX_BASE64 }}
|
||||
SIGN_PASSWORD: ${{ secrets.SIGN_PASSWORD }}
|
||||
@@ -104,27 +137,43 @@ jobs:
|
||||
run: |
|
||||
$pfx = Join-Path $env:RUNNER_TEMP "sign.pfx"
|
||||
[IO.File]::WriteAllBytes($pfx, [Convert]::FromBase64String($env:SIGN_PFX))
|
||||
$signtool = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object FullName -Descending | Select-Object -First 1
|
||||
Get-ChildItem out/release -Filter *.exe | ForEach-Object { & $signtool.FullName sign /fd SHA256 /f $pfx /p $env:SIGN_PASSWORD /tr http://timestamp.digicert.com /td SHA256 $_.FullName }
|
||||
Remove-Item $pfx
|
||||
try {
|
||||
$signtool = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object FullName -Descending | Select-Object -First 1
|
||||
Get-ChildItem out/release -Filter *.exe | ForEach-Object {
|
||||
& $signtool.FullName sign /fd SHA256 /f $pfx /p $env:SIGN_PASSWORD /tr http://timestamp.digicert.com /td SHA256 $_.FullName
|
||||
if ($LASTEXITCODE -ne 0) { throw "signtool failed for $($_.FullName)" }
|
||||
}
|
||||
} finally {
|
||||
Remove-Item $pfx -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
- name: Unsigned build notice
|
||||
if: env.HAS_SIGNING != 'true'
|
||||
run: echo "::notice title=Signing::SIGN_PFX_BASE64 is not set; the installers are unsigned."
|
||||
|
||||
- name: Release notes
|
||||
env:
|
||||
TAG: ${{ needs.version.outputs.tag }}
|
||||
run: |
|
||||
tag="${{ needs.version.outputs.tag }}"
|
||||
previous="$(git describe --tags --abbrev=0 "$tag^" 2>/dev/null || true)"
|
||||
range="${previous:+$previous..}$tag"
|
||||
git log --format='%h%x09%s' "$range" | dotnet src/Titano.Tools/bin/Release/net10.0/Titano.Tools.dll changelog --title "Titano ${{ needs.version.outputs.version }}" --out out/release-notes.md
|
||||
previous="$(git describe --tags --abbrev=0 "$TAG^" 2>/dev/null || true)"
|
||||
range="${previous:+$previous..}$TAG"
|
||||
git log --no-merges --format='%h%x09%s' "$range" | dotnet "$TOOLS" changelog --title "Titano $VERSION" --out out/release-notes.md
|
||||
cat out/release-notes.md
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-windows
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
out/release/
|
||||
out/release-notes.md
|
||||
out/screenshots/
|
||||
|
||||
docker:
|
||||
needs: version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
image: ${{ steps.image.outputs.name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -158,49 +207,98 @@ jobs:
|
||||
env:
|
||||
TAG: ${{ needs.version.outputs.tag }}
|
||||
VERSION: ${{ needs.version.outputs.version }}
|
||||
PRERELEASE: ${{ needs.version.outputs.prerelease }}
|
||||
IMAGE: ${{ needs.docker.outputs.image }}
|
||||
HAS_RELEASES_TOKEN: ${{ secrets.RELEASES_TOKEN != '' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ needs.version.outputs.tag }}
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
global-json-file: global.json
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release-windows
|
||||
path: out
|
||||
|
||||
- name: Checksums
|
||||
working-directory: out/release
|
||||
run: |
|
||||
cd out/release
|
||||
sha256sum * > SHA256SUMS
|
||||
rm -f SHA256SUMS
|
||||
sha256sum -- * > "$RUNNER_TEMP/SHA256SUMS"
|
||||
mv "$RUNNER_TEMP/SHA256SUMS" SHA256SUMS
|
||||
cat SHA256SUMS
|
||||
|
||||
- name: Create release in the public releases repository
|
||||
if: env.RELEASES_TOKEN != ''
|
||||
- name: Release target
|
||||
id: target
|
||||
run: |
|
||||
if [ "$HAS_RELEASES_TOKEN" = "true" ]; then
|
||||
echo "repo=$RELEASES_REPO" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "repo=$GITHUB_REPOSITORY" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice title=Release::RELEASES_TOKEN is not set: publishing to $GITHUB_REPOSITORY instead of $RELEASES_REPO (clients only see releases of $RELEASES_REPO)."
|
||||
fi
|
||||
|
||||
- name: Update the public releases repository
|
||||
if: env.HAS_RELEASES_TOKEN == 'true'
|
||||
env:
|
||||
RELEASES_TOKEN: ${{ secrets.RELEASES_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.RELEASES_TOKEN }}
|
||||
run: |
|
||||
flags=""
|
||||
if [ "${{ needs.version.outputs.prerelease }}" = "true" ]; then flags="--prerelease"; fi
|
||||
gh release create "$TAG" out/release/* --repo "$RELEASES_REPO" --title "Titano $VERSION" --notes-file out/release-notes.md $flags
|
||||
# Keep the Unraid template, icon and EULA in the public repository up to date.
|
||||
git clone --depth 1 "https://x-access-token:${RELEASES_TOKEN}@github.com/${RELEASES_REPO}.git" public
|
||||
mkdir -p public/unraid
|
||||
owner="${RELEASES_REPO%%/*}"
|
||||
branch="$(gh api "repos/$RELEASES_REPO" --jq .default_branch)"
|
||||
git clone --depth 1 "https://x-access-token:${GH_TOKEN}@github.com/${RELEASES_REPO}.git" public
|
||||
git -C public checkout -B "$branch"
|
||||
cp -R deploy/releases-repo/. public/
|
||||
mkdir -p public/unraid public/docker public/screenshots
|
||||
cp deploy/unraid/titano.xml public/unraid/titano.xml
|
||||
cp deploy/docker/docker-compose.yml deploy/docker/.env.example public/docker/
|
||||
dotnet run --project src/Titano.Tools -c Release -- make-icon --out "$RUNNER_TEMP/icons"
|
||||
cp "$RUNNER_TEMP/icons/titano-server-256.png" public/unraid/titano-server.png
|
||||
if [ -f docs/legal/EULA.md ]; then cp docs/legal/EULA.md public/EULA.md; fi
|
||||
rm -rf public/i18n
|
||||
cp -R i18n public/i18n
|
||||
cp out/release/SHA256SUMS public/SHA256SUMS
|
||||
for shot in library jobs settings-rendering server uploader-queue; do
|
||||
if [ -f "out/screenshots/$shot-dark.png" ]; then cp "out/screenshots/$shot-dark.png" public/screenshots/; fi
|
||||
done
|
||||
# Links in the published files follow the configured repository and image owner.
|
||||
find public -path public/.git -prune -o -type f \( -name '*.md' -o -name '*.yml' -o -name '*.xml' \) -print0 |
|
||||
xargs -0 -r sed -i -e "s#alby96/titano-releases#${RELEASES_REPO}#g" -e "s#ghcr.io/alby96/#ghcr.io/${owner,,}/#g"
|
||||
cd public
|
||||
git config user.name "titano-release"
|
||||
git config user.email "titano-release@users.noreply.github.com"
|
||||
git add -A
|
||||
git diff --cached --quiet || git commit -m "chore: update Unraid template and assets for $TAG"
|
||||
git push
|
||||
if git diff --cached --quiet; then
|
||||
echo "Public repository already up to date."
|
||||
else
|
||||
git commit -q -m "chore: update for $TAG"
|
||||
git push origin "HEAD:$branch"
|
||||
fi
|
||||
|
||||
- name: Create release in this repository (no RELEASES_TOKEN configured)
|
||||
if: env.RELEASES_TOKEN == ''
|
||||
- name: GitHub release
|
||||
env:
|
||||
RELEASES_TOKEN: ${{ secrets.RELEASES_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ env.HAS_RELEASES_TOKEN == 'true' && secrets.RELEASES_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
TARGET: ${{ steps.target.outputs.repo }}
|
||||
run: |
|
||||
flags=""
|
||||
if [ "${{ needs.version.outputs.prerelease }}" = "true" ]; then flags="--prerelease"; fi
|
||||
gh release create "$TAG" out/release/* --repo "$GITHUB_REPOSITORY" --title "Titano $VERSION" --notes-file out/release-notes.md $flags
|
||||
if gh release view "$TAG" --repo "$TARGET" > /dev/null 2>&1; then
|
||||
gh release upload "$TAG" out/release/* --repo "$TARGET" --clobber
|
||||
gh release edit "$TAG" --repo "$TARGET" --title "Titano $VERSION" --notes-file out/release-notes.md --prerelease="$PRERELEASE"
|
||||
else
|
||||
gh release create "$TAG" out/release/* --repo "$TARGET" --title "Titano $VERSION" --notes-file out/release-notes.md --prerelease="$PRERELEASE"
|
||||
fi
|
||||
|
||||
- name: Summary
|
||||
env:
|
||||
TARGET: ${{ steps.target.outputs.repo }}
|
||||
run: |
|
||||
{
|
||||
echo "## Titano $VERSION"
|
||||
echo "- Release: https://github.com/$TARGET/releases/tag/$TAG"
|
||||
echo "- Image: \`$IMAGE:$VERSION\`$([ "$PRERELEASE" = "false" ] && echo " and \`:latest\`")"
|
||||
echo "- GHCR packages are private when first pushed and GitHub has no API to change that: once, open the"
|
||||
echo " package settings of \`titano-server\` and set its visibility to **Public** (BRIEF §19.4)."
|
||||
echo
|
||||
echo '```'
|
||||
cat out/release/SHA256SUMS
|
||||
echo '```'
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -0,0 +1,67 @@
|
||||
name: Bug report
|
||||
description: Something in Titano, the Uploader or the Server does not work as expected.
|
||||
title: "[Bug] "
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time. Security problems go to the *Security* tab (see SECURITY.md), not here.
|
||||
- type: dropdown
|
||||
id: program
|
||||
attributes:
|
||||
label: Program
|
||||
options:
|
||||
- Titano (desktop)
|
||||
- Titano Uploader
|
||||
- Titano Server (Docker / Unraid)
|
||||
- Titano Server (Windows)
|
||||
- Setup / update
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: About shows it (server: admin panel › About, or /api/v1/server/info).
|
||||
placeholder: "0.2.0"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: system
|
||||
attributes:
|
||||
label: System
|
||||
description: Windows version, or the Docker/Unraid host and PostgreSQL version.
|
||||
placeholder: "Windows 11 24H2, RTX 4070 / Unraid 7.0, PostgreSQL 17"
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened
|
||||
description: What you did, what you expected and what happened instead.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
placeholder: |
|
||||
1. Import a card with ...
|
||||
2. Open the sequence ...
|
||||
3. ...
|
||||
- type: textarea
|
||||
id: diagnostics
|
||||
attributes:
|
||||
label: Diagnostics
|
||||
description: |
|
||||
Desktop: Settings › Advanced › *Export bundle*, then drag the zip here. Server: admin panel › Logs ›
|
||||
*Diagnostics*. Bundles contain logs and system information, never photos, passwords or tokens; read them
|
||||
before sharing if your folder or host names are private.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Checks
|
||||
options:
|
||||
- label: I am using the latest release.
|
||||
required: true
|
||||
- label: I searched the existing issues.
|
||||
required: true
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Report a security vulnerability
|
||||
url: https://github.com/alby96/titano-releases/security/advisories/new
|
||||
about: Please report security problems privately, never in a public issue.
|
||||
@@ -0,0 +1,49 @@
|
||||
name: Translation review
|
||||
description: A wrong, unclear or too long text in a translated version of Titano.
|
||||
title: "[Translation] "
|
||||
labels: ["translation"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Every language except English and Italian was machine-translated. Corrections from native speakers are very
|
||||
welcome. The texts are in `i18n/<language>/<Area>.<language>.resx`; English sources are in `i18n/en/`.
|
||||
Labels must stay short (at most about 30 characters), tooltips at most 200 characters, and placeholders such
|
||||
as `{0}` must be kept.
|
||||
- type: input
|
||||
id: language
|
||||
attributes:
|
||||
label: Language
|
||||
description: Language code as in the i18n folder.
|
||||
placeholder: "de, fr, pt-BR, zh-Hans…"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: key
|
||||
attributes:
|
||||
label: Key
|
||||
description: The `name` of the entry in the resx file, if you found it. Otherwise describe where the text appears.
|
||||
placeholder: "Library.Filter.Year"
|
||||
- type: textarea
|
||||
id: current
|
||||
attributes:
|
||||
label: Current text
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposed text
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Context
|
||||
description: Where the text appears (screen, button, tooltip) and why the proposal is better. A screenshot helps.
|
||||
- type: checkboxes
|
||||
id: native
|
||||
attributes:
|
||||
label: Reviewer
|
||||
options:
|
||||
- label: I am a native or fluent speaker of this language.
|
||||
@@ -0,0 +1,108 @@
|
||||
# Titano — End User Licence Agreement
|
||||
|
||||
> **DRAFT — not yet reviewed by a lawyer.** This text is a working draft prepared for the owner's legal review. It
|
||||
> is published so that the terms intended for Titano are visible, but it may change before the first stable
|
||||
> release. Where this draft is unclear or unenforceable, the mandatory law of your country applies.
|
||||
|
||||
Version 0.1 (draft) · Applies to Titano, Titano Uploader and Titano Server ("the Software"), including their
|
||||
installers, Docker images and updates.
|
||||
|
||||
## 1. Who the parties are
|
||||
|
||||
This agreement is between you (the person or organisation installing or using the Software) and the owner of the
|
||||
Titano project ("the Licensor"). By installing, copying or using the Software you accept these terms. If you do not
|
||||
accept them, do not install or use the Software.
|
||||
|
||||
## 2. Licence granted
|
||||
|
||||
The Licensor grants you a free of charge, non-exclusive, non-transferable, worldwide licence to:
|
||||
|
||||
1. install and use the Software on any number of computers, servers and containers that you own or control, for
|
||||
personal or commercial purposes, including producing and selling videos made with it;
|
||||
2. make copies of the installers and images for backup and for deployment inside your own organisation.
|
||||
|
||||
Everything you create with the Software — videos, images, projects, archives, reports — belongs to you. The
|
||||
Licensor claims no rights over your content.
|
||||
|
||||
## 3. Restrictions
|
||||
|
||||
You may not:
|
||||
|
||||
1. sell, rent, lease or sublicense the Software itself, or distribute modified copies of it;
|
||||
2. remove or alter copyright notices, the licence text or the update and verification mechanisms;
|
||||
3. reverse engineer, decompile or disassemble the Software, except to the extent that applicable law expressly
|
||||
permits it despite this restriction (for example for interoperability);
|
||||
4. use the Software in violation of applicable law, including laws on privacy and on the photographing of people
|
||||
and places.
|
||||
|
||||
Redistributing the unmodified installers, the `SHA256SUMS` file and the Docker image (for example in a mirror or a
|
||||
NAS app catalogue) is allowed as long as they are offered free of charge and this agreement accompanies them.
|
||||
|
||||
## 4. Your data and privacy
|
||||
|
||||
The Software runs on your own computers and servers. It does not send your photos, videos, archive or account data
|
||||
to the Licensor. The desktop programs contact the Internet only to:
|
||||
|
||||
- check the public releases repository for a newer version and download it when you ask (Settings › Updates; can be
|
||||
turned off);
|
||||
- reach the Titano Server you configure;
|
||||
- open links you click (in your browser).
|
||||
|
||||
Optional anonymous usage counts, if enabled by you in Settings, contain no personal data, file names or content.
|
||||
Diagnostics bundles are created only when you ask for one, are saved on your computer, and leave secrets (passwords,
|
||||
tokens, keys) out; you decide whether to share them.
|
||||
|
||||
## 5. Your responsibility for your files
|
||||
|
||||
The Software is designed never to modify original photos and to verify copies by hash before anything is deleted
|
||||
from a memory card. Nevertheless, you remain responsible for keeping independent backups of your data. Operations
|
||||
that delete or move files (card formatting, deleting sequences, clearing caches) are always shown to you before they
|
||||
run and require your explicit confirmation.
|
||||
|
||||
## 6. Third-party components
|
||||
|
||||
The Software contains no third-party libraries. It uses components of the operating system and of Microsoft .NET
|
||||
(for example Windows Imaging Component and Media Foundation codecs, including codecs installed from the Microsoft
|
||||
Store) under the terms that came with them. Formats such as H.264, HEVC and AV1 may be subject to patent licences;
|
||||
encoders provided by Windows and by your graphics driver are licensed by their suppliers.
|
||||
|
||||
## 7. Updates and support
|
||||
|
||||
The Licensor may publish updates but is not obliged to provide updates, support or maintenance. Updates are
|
||||
installed only when you run them. Support, if any, is offered through the public issue tracker.
|
||||
|
||||
## 8. No warranty
|
||||
|
||||
To the maximum extent permitted by applicable law, the Software is provided "as is", without warranty of any kind,
|
||||
express or implied, including warranties of merchantability, fitness for a particular purpose, accuracy and
|
||||
non-infringement. You use it at your own risk.
|
||||
|
||||
## 9. Limitation of liability
|
||||
|
||||
To the maximum extent permitted by applicable law, the Licensor is not liable for any indirect, incidental, special,
|
||||
consequential or punitive damages, or for any loss of data, profits, revenue or business, arising out of the use of
|
||||
or inability to use the Software, even if advised of the possibility of such damages. Where liability cannot be
|
||||
excluded, it is limited to the amount you paid for the Software (which is zero). Nothing in this agreement limits
|
||||
liability for wilful misconduct, gross negligence or anything else that cannot be limited by law, nor any rights
|
||||
you have as a consumer that cannot be waived.
|
||||
|
||||
## 10. Termination
|
||||
|
||||
This licence ends automatically if you breach it. On termination you must stop using the Software and delete your
|
||||
copies. Sections 4, 5, 8, 9 and 11 survive termination. Your content remains yours.
|
||||
|
||||
## 11. Governing law
|
||||
|
||||
This agreement is governed by the laws of Italy, without regard to its conflict-of-law rules; the courts of the
|
||||
Licensor's place of residence have jurisdiction, unless mandatory consumer protection law of your country gives you
|
||||
the right to sue at home. *(Draft note: jurisdiction to be confirmed by the owner.)*
|
||||
|
||||
## 12. Future paid features
|
||||
|
||||
Future versions may offer optional paid features or a supported edition under additional terms. Such terms will be
|
||||
shown before you accept them and never apply retroactively to versions you already installed.
|
||||
|
||||
## 13. Contact
|
||||
|
||||
Questions about this agreement: open an issue in this repository or use the contact listed in
|
||||
[SECURITY.md](SECURITY.md) for private matters.
|
||||
@@ -0,0 +1,119 @@
|
||||
# Titano
|
||||
|
||||
Titano turns folders of photos (RAW, JPEG, HEIC…) into finished time-lapse videos and keeps a lifetime archive of
|
||||
your shoots organised, verified and searchable — on one PC or on a shared server.
|
||||
|
||||
This repository publishes the installers, the Docker image instructions, the Unraid template and the translations
|
||||
for community review. Development happens elsewhere; please use the issues here for bugs and translation fixes.
|
||||
|
||||

|
||||
|
||||
## Components
|
||||
|
||||
| Program | Runs on | What it does |
|
||||
|---|---|---|
|
||||
| **Titano** | Windows 10 21H2+ / 11, x64 | Desktop client: card import with hash verification, archive, analysis advisor, sequence editor, rendering with GPU encoders (H.264, HEVC, AV1) |
|
||||
| **Titano Uploader** | Windows 10 21H2+ / 11, x64 | Small tray program that uploads photos, folders, cards and watch folders to a Titano Server |
|
||||
| **Titano Server** | Docker (linux/amd64, linux/arm64), Unraid, Windows | Shared archive, users, resumable uploads, sync, background jobs, render delegation to GPU-equipped PCs, web admin panel |
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
## Requirements
|
||||
|
||||
- **Desktop programs:** Windows 10 version 21H2 or later, or Windows 11, 64-bit (x64). 8 GB of memory or more is
|
||||
recommended for 4K renders. No other runtime is needed: the programs are self-contained.
|
||||
- **Camera RAW files:** Titano develops DNG, CR2, NEF, ARW, PEF and RAF on its own. With Microsoft's free
|
||||
*Raw Image Extension* installed, Windows' decoder is used first and covers the other formats (CR3, ORF, RW2…);
|
||||
without it they render from the full-size preview embedded by the camera. HEIC needs Microsoft's *HEIF Image
|
||||
Extensions* and *HEVC Video Extensions*.
|
||||
- **Hardware encoding:** any GPU whose driver provides Media Foundation encoders (NVIDIA, AMD, Intel). Without one,
|
||||
Titano encodes H.264 in software and its own formats (AVI, GIF, APNG, image sequences).
|
||||
- **Server:** Docker 20.10+ (or Unraid 6.12+) and PostgreSQL 16 or 17; or Windows 10/11/Server 2019+ x64.
|
||||
|
||||
## Install, upgrade, uninstall (Windows)
|
||||
|
||||
1. Download `Titano-Setup-<version>.exe` (Titano, Uploader and, optionally, Server) or
|
||||
`Titano-Uploader-Setup-<version>.exe` from the [latest release](../../releases/latest).
|
||||
2. Check the download (optional, recommended): in PowerShell run
|
||||
`Get-FileHash .\Titano-Setup-<version>.exe -Algorithm SHA256` and compare the value with the line for that file
|
||||
in `SHA256SUMS` of the same release.
|
||||
3. Run the setup. It installs for the current user into `%LOCALAPPDATA%\Programs\Titano` without administrator
|
||||
rights; choose *All users* to install into `Program Files` (Windows asks for permission).
|
||||
|
||||
- **Upgrade:** Titano checks this repository at start (you can turn this off in Settings › Updates) and shows a notice
|
||||
when a new version exists. *Download* fetches the setup, verifies it against `SHA256SUMS` and shows it in Explorer;
|
||||
run it to upgrade in place. Your archive, settings and index are kept.
|
||||
- **Uninstall:** Windows Settings › Apps › Installed apps › Titano › Uninstall. Your photos and archive are never
|
||||
touched; the program data folder (`%LOCALAPPDATA%\Titano`) is removed only if you tick the option to do so.
|
||||
- **Silent install** (IT deployment): `Titano-Setup-<version>.exe /S [/DIR="D:\Apps\Titano"] [/ALLUSERS]
|
||||
[/COMPONENTS=Titano,Uploader,Server] [/NODESKTOP] [/NOSTARTMENU] [/LANG=it]`. Silent uninstall:
|
||||
`"%LOCALAPPDATA%\Programs\Titano\Uninstall Titano.exe" /uninstall /S`.
|
||||
- **Portable:** `Titano-win-x64-portable-<version>.zip` keeps its data in a `data` folder next to `Titano.exe`
|
||||
(because of the `portable.txt` file). Do not unpack it into a OneDrive or Dropbox folder.
|
||||
|
||||
## Titano Server with Docker Compose
|
||||
|
||||
```sh
|
||||
mkdir titano && cd titano
|
||||
curl -LO https://raw.githubusercontent.com/alby96/titano-releases/main/docker/docker-compose.yml
|
||||
curl -L -o .env https://raw.githubusercontent.com/alby96/titano-releases/main/docker/.env.example
|
||||
# edit .env: TITANO_ADMIN_PASSWORD, TITANO_DB_PASSWORD, TITANO_ARCHIVE (folder of your archive), PUID/PGID, TZ
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Open `http://<host>:8080/admin`, sign in as `admin` with the password from `.env` and choose a new one. Titano
|
||||
clients connect to `https://<host>:8443`; the first connection shows the server's certificate fingerprint, which the
|
||||
admin panel shows under Settings so you can compare them.
|
||||
|
||||
- Image: `ghcr.io/alby96/titano-server:latest` (also `:<version>`; `:nightly` follows development and is not for
|
||||
production use). Multi-arch: `linux/amd64` and `linux/arm64`.
|
||||
- Volumes: `/archive` (originals, sidecars, proxies, renders — the archive stays readable without Titano) and `/data`
|
||||
(settings, TLS certificate, uploads in progress, logs).
|
||||
- Upgrade: `docker compose pull && docker compose up -d`. Jobs in progress resume from their last checkpoint.
|
||||
- All settings: environment variables `TITANO_*` (see `docker-compose.yml`) or `/data/server.json`. Run
|
||||
`docker run --rm ghcr.io/alby96/titano-server:latest --help` for the list.
|
||||
|
||||
## Titano Server on Unraid
|
||||
|
||||
1. Install the official **postgresql17** template from Community Applications. Create a database `titano` owned by a
|
||||
role `titano` (for example with `docker exec -it postgresql17 psql -U postgres -c "CREATE ROLE titano LOGIN
|
||||
PASSWORD '…'" -c "CREATE DATABASE titano OWNER titano"`).
|
||||
2. In Docker › *Template repositories* add `https://github.com/alby96/titano-releases` and save.
|
||||
3. Docker › *Add container* › Template `titano-server`. Set the admin password, the database host (the PostgreSQL
|
||||
container's name or IP), password and the archive share (default `/mnt/user/Timelapse`).
|
||||
4. Open the WebUI (`http://[IP]:8080/admin`).
|
||||
|
||||
The template file is [`unraid/titano.xml`](unraid/titano.xml).
|
||||
|
||||
## Titano Server on Windows
|
||||
|
||||
Unpack `Titano-Server-win-x64-<version>.zip` (or choose the *Server* component in the setup). It uses SQLite in
|
||||
`C:\ProgramData\Titano Server` by default, or PostgreSQL with `TITANO_DB=postgres` and the `TITANO_DB_*` variables.
|
||||
Run `Titano.Server.exe` in a console, or install it as a Windows service from an administrator prompt with
|
||||
`Titano.Server.exe --install-service` (remove it with `--uninstall-service`).
|
||||
|
||||
## Translations
|
||||
|
||||
Titano is written in English and Italian; every other language is machine-translated and marked as such in
|
||||
About. The source strings are in [`i18n/`](i18n): `en/<Area>.resx` is the source, `<language>/<Area>.<language>.resx`
|
||||
the translation. To suggest a correction, open a **Translation review** issue with the key, the current text and
|
||||
your proposal — or the in-app *Review* link in About, which leads here.
|
||||
|
||||
## Verifying downloads
|
||||
|
||||
Every release carries `SHA256SUMS`. On Linux or macOS: `sha256sum -c SHA256SUMS --ignore-missing`. Titano's
|
||||
in-app update download performs the same check before showing the setup. Signed builds carry an Authenticode
|
||||
signature; unsigned builds may show a SmartScreen prompt.
|
||||
|
||||
## Support and security
|
||||
|
||||
- Bugs: open a **Bug report** issue (attach the diagnostics bundle from Settings › Advanced › *Export bundle*; it
|
||||
contains logs and system information, never photos, passwords or tokens).
|
||||
- Security problems: see [SECURITY.md](SECURITY.md) — please do not open public issues for them.
|
||||
|
||||
## Licence
|
||||
|
||||
Titano is proprietary software distributed free of charge under the [End User Licence Agreement](EULA.md).
|
||||
@@ -0,0 +1,48 @@
|
||||
# Security policy
|
||||
|
||||
## Supported versions
|
||||
|
||||
Security fixes are made for the latest release only. Upgrade before reporting a problem you found in an older
|
||||
version; the in-app update check (Settings › Updates) and `docker compose pull` keep installations current.
|
||||
|
||||
| Version | Supported |
|
||||
|---|---|
|
||||
| Latest release | Yes |
|
||||
| Older releases, pre-releases, `:nightly` images | No |
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
Please **do not open a public issue** for a security problem.
|
||||
|
||||
Use GitHub's private vulnerability reporting: *Security* tab of this repository › *Report a vulnerability*. Include:
|
||||
|
||||
- the affected program (Titano, Uploader, Server) and version (About, or `/api/v1/server/info` for the server);
|
||||
- how to reproduce the problem, and what an attacker gains;
|
||||
- whether the server runs behind a reverse proxy and which TLS mode it uses (`auto`, `pem`, `proxy`).
|
||||
|
||||
Do not attach diagnostics bundles or logs that you have not read: they are scrubbed of passwords and tokens, but
|
||||
they contain host names, folder paths and user names.
|
||||
|
||||
You will receive an acknowledgement within 7 days. Fixes are released as soon as they are ready, and the release
|
||||
notes credit the reporter unless they prefer otherwise. Please give us 90 days, or until a fix is released, before
|
||||
disclosing the problem publicly.
|
||||
|
||||
## Scope
|
||||
|
||||
In scope: the desktop programs, the installer, the server API and admin panel, the Docker image and the Unraid
|
||||
template published here.
|
||||
|
||||
Out of scope: problems that need an attacker who already controls the user's Windows account or the server host;
|
||||
denial of service through unrealistic load; self-signed certificate warnings (the client pins the fingerprint you
|
||||
confirm at first connection); findings from automated scanners without a demonstrated impact.
|
||||
|
||||
## How Titano protects you
|
||||
|
||||
- Releases list the SHA-256 of every file in `SHA256SUMS`; the in-app update download refuses a file whose hash does
|
||||
not match. Builds are Authenticode-signed when a signing certificate is configured.
|
||||
- The server stores passwords with PBKDF2-SHA512 (210,000 iterations) and session tokens only as SHA-256 hashes;
|
||||
sign-in is rate limited and accounts lock after repeated failures.
|
||||
- Desktop clients pin the server certificate fingerprint on first use, never send a saved token to a server whose
|
||||
certificate changed, and keep tokens encrypted with Windows DPAPI.
|
||||
- No program runs external tools or scripts; the only programs Titano starts are your browser (for links) and
|
||||
Explorer (to show a folder).
|
||||
@@ -15,7 +15,7 @@ public static class ProductLinks
|
||||
public static string LatestReleaseApi => $"https://api.github.com/repos/{ReleasesRepository}/releases/latest";
|
||||
|
||||
/// <summary>The licence (EULA) published with the releases (BRIEF §12.9).</summary>
|
||||
public static string Licence => $"{Repository}/blob/HEAD/LICENSE.md";
|
||||
public static string Licence => $"{Repository}/blob/HEAD/EULA.md";
|
||||
|
||||
/// <summary>Where translations are reviewed by the community (BRIEF §16).</summary>
|
||||
public static string Issues => $"{Repository}/issues";
|
||||
|
||||
@@ -10,18 +10,20 @@ namespace Titano.Tools.Commands;
|
||||
/// §20.2): interrupted downloads resume from their <c>.part</c> file with an HTTP range request, every file is verified
|
||||
/// against its SHA-256, and verified files are skipped. An entry whose <c>sha256</c> is null gets the hash of its first
|
||||
/// download recorded in <c>external/recorded-hashes.json</c> (later runs verify against it) and printed so it can be
|
||||
/// copied into the manifest.
|
||||
/// copied into the manifest. A fixture that cannot be fetched is reported as a GitHub warning annotation when running
|
||||
/// in Actions (tests that need it skip); <c>--allow-missing</c> then keeps the exit code 0, so CI shows the warning
|
||||
/// instead of a silently "passed" step.
|
||||
/// </summary>
|
||||
internal sealed class FixturesCommand : ICommand
|
||||
{
|
||||
private const string RecordedHashesFile = "recorded-hashes.json";
|
||||
|
||||
public string Name => "fixtures";
|
||||
public string Summary => "Download and verify the CC0 RAW samples in tests/fixtures/manifest.json (--manifest, --out)";
|
||||
public string Summary => "Download and verify the CC0 RAW samples in tests/fixtures/manifest.json (--manifest, --out, --allow-missing)";
|
||||
|
||||
public async Task<int> RunAsync(string[] args)
|
||||
{
|
||||
var a = new Args(args);
|
||||
var a = new Args(args, "allow-missing");
|
||||
var root = Args.RepoRoot();
|
||||
var manifestPath = a.Get("manifest") ?? Path.Combine(root, "tests", "fixtures", "manifest.json");
|
||||
var outDir = a.Get("out") ?? Path.Combine(root, "tests", "fixtures", "external");
|
||||
@@ -33,7 +35,7 @@ internal sealed class FixturesCommand : ICommand
|
||||
? JsonSerializer.Deserialize<Dictionary<string, string>>(await File.ReadAllTextAsync(recordedPath)) ?? []
|
||||
: [];
|
||||
var newlyRecorded = new List<string>();
|
||||
var failures = 0;
|
||||
var missing = new List<(Entry Entry, string Reason)>();
|
||||
using var http = new HttpClient { Timeout = TimeSpan.FromMinutes(10) };
|
||||
http.DefaultRequestHeaders.UserAgent.ParseAdd("Titano.Tools/1.0 (+fixtures)");
|
||||
foreach (var entry in entries)
|
||||
@@ -65,7 +67,7 @@ internal sealed class FixturesCommand : ICommand
|
||||
}
|
||||
catch (Exception ex) when (ex is HttpRequestException or IOException or InvalidDataException or TaskCanceledException or UnauthorizedAccessException)
|
||||
{
|
||||
failures++;
|
||||
missing.Add((entry, ex.Message));
|
||||
Console.Error.WriteLine($"failed {entry.Name}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
@@ -75,8 +77,18 @@ internal sealed class FixturesCommand : ICommand
|
||||
Console.WriteLine("Recorded SHA-256 of first downloads (copy into the manifest to pin them):");
|
||||
foreach (var line in newlyRecorded) Console.WriteLine(" " + line);
|
||||
}
|
||||
Console.WriteLine(failures == 0 ? $"{entries.Count} fixture(s) ready in {outDir}" : $"{failures} of {entries.Count} fixture(s) failed");
|
||||
return failures == 0 ? 0 : 1;
|
||||
if (missing.Count == 0)
|
||||
{
|
||||
Console.WriteLine($"{entries.Count} fixture(s) ready in {outDir}");
|
||||
return 0;
|
||||
}
|
||||
Console.WriteLine($"{missing.Count} of {entries.Count} fixture(s) missing; the tests that need them are skipped.");
|
||||
if (Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "true")
|
||||
{
|
||||
var manifestFile = Path.GetRelativePath(root, manifestPath).Replace('\\', '/');
|
||||
foreach (var (entry, reason) in missing) Console.WriteLine(Annotation(manifestFile, entry, reason));
|
||||
}
|
||||
return a.Has("allow-missing") ? 0 : 1;
|
||||
|
||||
void Record(string name, string hash)
|
||||
{
|
||||
@@ -86,7 +98,22 @@ internal sealed class FixturesCommand : ICommand
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed record Entry(string Name, Uri Url, string? Sha256, long? Size);
|
||||
internal sealed record Entry(string Name, Uri Url, string? Sha256, long? Size, string? Format);
|
||||
|
||||
/// <summary>A GitHub Actions warning naming the missing fixture, why, and where the fix goes.</summary>
|
||||
internal static string Annotation(string manifestFile, Entry entry, string reason)
|
||||
{
|
||||
var message = $"{entry.Name} ({entry.Format ?? "RAW"}) could not be fetched from {entry.Url.AbsoluteUri}: {reason.TrimEnd('.')}. " +
|
||||
"Its decode tests are skipped. Replace the url in the manifest (see its 'instructions').";
|
||||
return $"::warning file={Escape(manifestFile, property: true)},title={Escape("RAW fixture missing", property: true)}::{Escape(message, property: false)}";
|
||||
}
|
||||
|
||||
/// <summary>Workflow-command escaping (properties also escape ':' and ',').</summary>
|
||||
private static string Escape(string value, bool property)
|
||||
{
|
||||
var escaped = value.Replace("%", "%25", StringComparison.Ordinal).Replace("\r", "%0D", StringComparison.Ordinal).Replace("\n", "%0A", StringComparison.Ordinal);
|
||||
return property ? escaped.Replace(":", "%3A", StringComparison.Ordinal).Replace(",", "%2C", StringComparison.Ordinal) : escaped;
|
||||
}
|
||||
|
||||
internal static List<Entry> ReadManifest(string path)
|
||||
{
|
||||
@@ -101,7 +128,8 @@ internal sealed class FixturesCommand : ICommand
|
||||
throw new ToolException($"Fixture {name} needs an https URL");
|
||||
var sha = f.TryGetProperty("sha256", out var s) && s.ValueKind == JsonValueKind.String ? s.GetString() : null;
|
||||
long? size = f.TryGetProperty("size", out var z) && z.ValueKind == JsonValueKind.Number ? z.GetInt64() : null;
|
||||
entries.Add(new Entry(name, url, sha, size));
|
||||
var format = f.TryGetProperty("format", out var fm) && fm.ValueKind == JsonValueKind.String ? fm.GetString() : null;
|
||||
entries.Add(new Entry(name, url, sha, size, format));
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
Vendored
+9
-1
@@ -1,5 +1,13 @@
|
||||
{
|
||||
"description": "CC0 RAW samples from raw.pixls.us (one per managed RAW decoder), fetched by 'Titano.Tools fixtures' into tests/fixtures/external (git-ignored, CI-cached on this file). sha256 null: the first download records its hash in external/recorded-hashes.json and prints it for pinning here. width/height: size the managed decoder develops (before orientation). urlVerified false: the URL follows the site's data/<make>/<model>/ layout but was written without network access; replace it with the sample's download link if the fetch reports 404.",
|
||||
"description": "CC0 RAW samples from raw.pixls.us (one per managed RAW decoder), fetched by 'Titano.Tools fixtures' into tests/fixtures/external (not committed; CI caches it keyed on this file). sha256 null: the first download records its hash in external/recorded-hashes.json and prints it for pinning here. width/height: size the managed decoder develops (before orientation). urlVerified false: the URL follows the site's data/<make>/<model>/ layout but was written without network access and may 404; CI then shows a 'RAW fixture missing' warning and the decode tests for that file are skipped.",
|
||||
"instructions": [
|
||||
"1. Open https://raw.pixls.us/ and find the camera (make, model) of the entry; pick a sample whose licence column says CC0.",
|
||||
"2. Copy that sample's download link (a https://raw.pixls.us/data/... URL) into 'url' and set 'urlVerified' to true.",
|
||||
"3. Run 'dotnet run --project src/Titano.Tools -- fixtures': it downloads into tests/fixtures/external and prints the SHA-256 of each first download.",
|
||||
"4. Copy each printed hash into 'sha256' and the file length into 'size', so later runs verify the exact file.",
|
||||
"5. Run 'dotnet run --project src/Titano.Tools -- diagnose tests/fixtures/external' and set 'width'/'height' to the developed size it reports (before orientation).",
|
||||
"6. Run 'dotnet run --project tests/Titano.Core.Tests -- --filter ExternalFixture' and commit the manifest (never the downloaded files)."
|
||||
],
|
||||
"license": "CC0-1.0",
|
||||
"files": [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user