Skip to content

shipcrate 0.5.0

Choose a tag to compare

@simarpreetsingh-019 simarpreetsingh-019 released this 22 Nov 15:58
· 76 commits to main since this release

Fixed (important)

  • The gate flagged every project's own TOKEN name as a credential when the name had 8+ characters (e.g. makereel): the exclusion never matched grep -n output. Found on makereel.
  • shipcrate sync could stop before finishing (exit 1, version not recorded) when the last file it checked was edited. Found on msh.
  • Projects set up before 0.5 kept old scripts silently: with no record of what shipcrate wrote, sync treats every differing file as yours. It now says so and that older copies miss fixes (Thermo's release.sh would still refuse 1.10.0 after the beta).
  • Python gate: uses the project's .venv when there is one, and says "needs pytest" instead of a confusing unittest error; .env.example / .env.sample / .env.template are no longer blocked.
  • Update-path test for CLIs that ask first: retries upgrade -y / --yes when there's no terminal (msh).
  • Pre-release ordering in all 4 updaters: 1.10.0-beta.2 was treated as equal to 1.10.0-beta.1, so beta testers couldn't get the next beta. In Swift, 1.10.0 was also equal to 1.10.0-beta.1, so beta testers never got the final release. Updaters now use semantic-versioning order (beta.1 < beta.2 < beta.10 < rc.1 < release). Found by the new update-path test on Thermo.
  • release.sh refused 1.10.0 after 1.10.0-beta.1 ("isn't newer"). Versions are now compared with ver_gt in lib.sh.

Added

  • Safe updates for live apps (6 rules): shipcrate sync (shipcrate releases only, records SHIPCRATE_VERSION); release.sh asks for a beta first, a passing scripts/update-path-test.sh (the last stable copy updates itself to the new build, locally) and a timed rollout (SAFE_ROLLOUT_DAYS, default 7) when shipcrate's code or the updater changed; it refuses to drop download names the last release had. Escape hatches: --skip-beta, --skip-update-test, --full-rollout, --allow-renamed-assets.
  • Your pieces stay yours: sync and doctor list a project's own installer, updater copy and release script, explain what shipcrate's version would add, and point to shipcrate sync --show FILE for a diff. keygen.sh explains signed updates (today vs after, cost of a lost key) and asks first.
  • shipcrate sync never overwrites your edits: init and sync record checksums in .shipcrate/files.sha256; edited files are shown as a diff and only replaced if you say so (--yes keeps them).
  • Swift template: a --update-now launch flag pattern (the example app has it).

Fixed

  • Swift projects without SwiftPM: a lower-case tests/ folder no longer triggers swift test (macOS disks ignore case).
  • Bash scripts are syntax-checked with bash -n (by shebang), so process substitution no longer fails the gate.
  • changelog.sh and release.sh ignore moving tags like v1 and the channel release when finding the last version.
  • release.sh takes a lock (.git/shipcrate-release.lock, pid + host) so two releases can't run at once from one folder.
  • SwiftLint is skipped locally when it isn't usable (it needs full Xcode) and runs in CI; the gitleaks hint shows once.
  • The 5 MB file check suggests how to shrink videos or attach big files to a release; captured output is printed with printf.
  • Safety: the shipped tests (tests/shipcrate/) could run a project's own install.sh (which init keeps), and in one project that overwrote a real installed binary. The tests now run only shipcrate's installer (identified by a marker, checked before running it), and only inside a sandbox (temp HOME, XDG folders and PATH). Regression test added.