diff --git a/internal/shell/tray/verstak.png b/internal/shell/tray/verstak.png index 42a45ed..a101e8a 100644 Binary files a/internal/shell/tray/verstak.png and b/internal/shell/tray/verstak.png differ diff --git a/release-notes/v0.1.0-alpha.7.md b/release-notes/v0.1.0-alpha.7.md new file mode 100644 index 0000000..5d12ef4 --- /dev/null +++ b/release-notes/v0.1.0-alpha.7.md @@ -0,0 +1,22 @@ +## Highlights + +- Made branded tray and application icon generation deterministic: repeated + local builds no longer leave timestamp-only changes in the working tree. +- The packaging checks now verify that all PNG and ICO icon outputs are stable + across consecutive generations. + +## Главное + +- Генерация фирменных значков трея и приложения стала детерминированной: + повторная локальная сборка больше не оставляет в рабочем дереве изменения, + отличающиеся только временной меткой. +- Проверки упаковки теперь убеждаются, что PNG и ICO остаются одинаковыми при + последовательных генерациях. + +## Packages / Пакеты + +This prerelease provides a portable Windows archive, a Debian package, and an +AppImage for Linux. + +В этот prerelease входят переносимый архив для Windows, Debian-пакет и AppImage +для Linux. diff --git a/scripts/generate-brand-icons.sh b/scripts/generate-brand-icons.sh index cc2e750..6ff4e79 100755 --- a/scripts/generate-brand-icons.sh +++ b/scripts/generate-brand-icons.sh @@ -18,7 +18,7 @@ render_png() { local size="$1" local target="$2" mkdir -p "$(dirname "$target")" - "$MAGICK" -background none "$SOURCE" -resize "${size}x${size}" "PNG32:$target" + "$MAGICK" -background none "$SOURCE" -resize "${size}x${size}" -strip "PNG32:$target" } render_ico() { diff --git a/scripts/test-brand-icons.sh b/scripts/test-brand-icons.sh new file mode 100755 index 0000000..92eb7d8 --- /dev/null +++ b/scripts/test-brand-icons.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +ICONS=( + "$ROOT/internal/shell/tray/verstak.png" + "$ROOT/internal/shell/tray/verstak.ico" + "$ROOT/build/appicon.png" + "$ROOT/build/windows/icon.ico" +) + +"$ROOT/scripts/generate-brand-icons.sh" +first="$(sha256sum "${ICONS[@]}")" +"$ROOT/scripts/generate-brand-icons.sh" +second="$(sha256sum "${ICONS[@]}")" + +if [[ "$first" != "$second" ]]; then + echo "brand icon generation is not deterministic" >&2 + exit 1 +fi + +echo "desktop brand icon generation is deterministic" diff --git a/scripts/test-package-formats.sh b/scripts/test-package-formats.sh index dc8a725..64c7a20 100755 --- a/scripts/test-package-formats.sh +++ b/scripts/test-package-formats.sh @@ -55,6 +55,7 @@ grep -Fq 'package-deb.sh' "$ROOT/scripts/release.sh" grep -Fq 'package-appimage.sh' "$ROOT/scripts/release.sh" grep -Fq 'generate-brand-icons.sh' "$ROOT/scripts/build.sh" grep -Fq 'generate-brand-icons.sh' "$ROOT/scripts/build-windows.sh" +test -x "$ROOT/scripts/test-brand-icons.sh" grep -Fq 'package-windows-portable.sh' "$ROOT/scripts/release.sh" git -C "$ROOT" check-ignore -q verstak-desktop-res.syso grep -Fq 'chmod -R a+rX' "$ROOT/scripts/build-linux-bundle.sh" diff --git a/scripts/test.sh b/scripts/test.sh index cae4f57..54e52a3 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -39,6 +39,10 @@ OUTPUT=$(cd "$ROOT" && go test -count=1 -v ./... 2>&1) || GO_TEST_STATUS=$? echo "$OUTPUT" | grep -E '(FAIL|PASS|---)' || true report "go test" "$GO_TEST_STATUS" +BRAND_ICONS_STATUS=0 +(cd "$ROOT" && ./scripts/test-brand-icons.sh) || BRAND_ICONS_STATUS=$? +report "desktop brand icon generation" "$BRAND_ICONS_STATUS" + WAILS_BINDINGS_STATUS=0 (cd "$ROOT" && node frontend/tests/wails-bindings-test.mjs) || WAILS_BINDINGS_STATUS=$? report "Wails notification bindings" "$WAILS_BINDINGS_STATUS"