fj release: --pattern, --clobber, and implicit-latest for download/upload/view #133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task
Make
fj releaseasset and lookup verbs scriptable:--pattern <glob>tofj release download(repeatable, OR-combined), matched againsta.namewith a glob crate, alongside the existing exact-n/--name.--clobbertodownload(overwrite existing files; without it, skip-with-note instead of the current silentstd::fs::writeoverwrite atsrc/cli/release.rs:410) and toupload(delete-then-reupload, or PATCH, an existing same-named asset) so re-runs are idempotent.<TAG>optional onviewanddownload: when omitted, resolve the latest published release (skip drafts/prereleases unless asked). Optionally a--latestflag for explicitness.Source: rasterstate/fj#122.
Priority
p3. These flags turn the install/publish surface into a scriptable one (self-update/bootstrap pulling
fj-*-linux-x86_64.tar.gzfrom the latest release; re-runnable publish jobs). Below the p2 parity items because the audience is narrower (release pipelines specifically) and exact-name download plusrelease list --json | jq '.[0].tag_name'is a working stopgap.Reason
Three concrete gaps in
src/cli/release.rs: download is exact-match only (&a.name != filterstring equality at:395-399), there is no--clobberon download or upload so retried publish jobs fight prior assets, and bothviewanddownloadrequire a positional<TAG>(get_by_tagat:226/:390) with no implicit-latest, forcing callers to scrape.tag_nameback out first.fj releasealready gets the hard parts right (draft/prerelease, path-traversal-safesafe_asset_dest); these are small, well-scoped flags.Acceptance
fj release download <tag> --pattern '*.tar.gz'downloads matching assets; repeatable and OR-combined.--clobberoverwrites on download and republishes on upload; without it, download skips existing files with a note rather than silently overwriting.fj release viewandfj release downloadwith no<TAG>resolve the latest published release (drafts/prereleases skipped).fj release list --exclude-drafts/--exclude-pre-releases.src/client/integration_tests.rsfor pattern matching, clobber, and latest resolution.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings, andcargo test --allpass.Dependencies
None. Self-contained within
fj release.Size
M
fj releasedownload/upload/view lack scripting affordances (--pattern,--clobber, implicit latest) #122