Commit Graph

5 Commits (a19b3deb24358900ca1fdd2c662046781b58babe)

Author SHA1 Message Date
mirivlad 59b57a4970 fix: make the windows zip independent of locale and timezone
With file modes normalized, the four tarballs reproduced byte for byte across
hosts but the Windows zip still did not. Two host properties were leaking into
it:

- Entry order. The archive is fed by `find | sort`, and sort honours the
  locale. A ru_RU.UTF-8 host emits docs/ before LICENSE; a C locale emits the
  reverse. Same files, different archive.
- Timestamps. zip records DOS local time with no zone attached, so building at
  UTC+08 embedded 19:06 where ubuntu-latest embedded 11:06 for the same commit.

Pin LC_ALL=C and TZ=UTC for the packaging subshell. Building the same commit
under ru_RU.UTF-8/Asia-Shanghai and under C/UTC now yields one hash.

The tarballs never had either problem: tar sorts internally by byte value and
stores Unix epochs, so neither locale nor zone reaches the output.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 19:10:07 +08:00
mirivlad 878f7b4472 fix: normalize file modes when packaging a release
release.sh normalized entry order, ownership and mtimes, but not permissions,
so the archives inherited the builder's umask. A host with umask 002 packaged
664/775 while ubuntu-latest packaged 644/755, and the two archives hashed
differently even though every file inside was byte-identical:

  CI     -rw-r--r--  README.md   local  -rw-rw-r--  README.md
  CI     -rwxr-xr-x  sshkeeper   local  -rwxrwxr-x  sshkeeper

Force 755 on directories and the program, 644 on everything else. Building the
same commit under umask 002 and umask 022 now yields identical checksums.

Also correct the reproducibility claim in the release docs. What is reproducible
is the binary, given the same commit and Go version; the archive hash still
depends on the host tar and gzip, so the documented verification step now
compares the extracted binary instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 19:06:12 +08:00
mirivlad 19ffc4ba5e build: pin version discovery to v* tags
Nightly builds will move a rolling `nightly` tag across main. A plain
`git describe --tags` returns whichever tag is nearest, so once that tag exists
every build — including a real release build — would report its version as
"nightly" and lose the release lineage entirely.

Restrict discovery to `v*` so the rolling tag is invisible to versioning:

  with a nightly tag ahead of v0.3.1
    git describe --tags                → nightly
    git describe --tags --match 'v*'   → v0.3.1-1-gf940087

Land this before the nightly workflow exists, so no build is ever stamped from
the rolling tag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 18:56:45 +08:00
mirivlad 8e59c3052e feat: add cross-platform release packaging 2026-06-06 10:49:56 +08:00
mirivlad fa9b07e3d5 sshkeeper: add build.sh and release.sh scripts 2026-06-03 15:09:32 +08:00