You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you're approaching a new breaking change release with the 2.0 release, now is a good time to consider improving how the assets are named? (more details)
I usually see tar.gz archives (or .zip for windows) which allows preserving file attributes like the executable bit +x (not always ideal though, as the linked issue points out).
I can understand wanting to avoid a compressed archive (which should ideally vary by platform, see goreleaser config example as a way to support that), running chmod +x afterwards resolves the executable concern anyway 👍
I think a better convention is to keep the tag in the URL and leave it out of the asset name? That would allow:
# `-o` to rename to something nicer, and places at a location in `PATH` ENV
curl -fsSL -o /usr/local/bin/jaq "https://github.com/01mf02/jaq/releases/latest/download/jaq-$(uname -m)-unknown-linux-musl"
chmod +x /usr/local/bin/jaq
One benefit from an archive would be that the full target is separate from the binary name, so in addition to preserving +x I could just use:
# `-C /usr/local/bin` only needed to place the `jaq` binary there# NOTE: The ownership from CI will be preserved as `1001:127`,# so technically `--no-same-owner` is required for tar too (doesn't seem to be a common issue though)
curl -fsSL "https://github.com/01mf02/jaq/releases/latest/download/jaq-$(uname -m)-unknown-linux-musl.tar.gz" \
| tar -xz -C /usr/local/bin
But if that adds some friction to users that aren't using CLI and would prefer the asset without the archive layer, no worries.
I just wanted to point out the benefit of omitting the version from the asset name 😎 (which could add a new example to the README for linux)
The text was updated successfully, but these errors were encountered:
I like the idea of omitting the version number, so future releases should have the shape that you proposed (see babc05c).
I also like the idea of adding a new example to the README, I hope that I'll remember to put it up once 2.0 is out.
However, I'll stick without archives for now, because it's easier for users, I think.
As you're approaching a new breaking change release with the
2.0
release, now is a good time to consider improving how the assets are named? (more details)Presently if I download the asset it's like this:
tar.gz
archives (or.zip
for windows) which allows preserving file attributes like the executable bit+x
(not always ideal though, as the linked issue points out).goreleaser
config example as a way to support that), runningchmod +x
afterwards resolves the executable concern anyway 👍I think a better convention is to keep the tag in the URL and leave it out of the asset name? That would allow:
One benefit from an archive would be that the full target is separate from the binary name, so in addition to preserving
+x
I could just use:But if that adds some friction to users that aren't using CLI and would prefer the asset without the archive layer, no worries.
I just wanted to point out the benefit of omitting the version from the asset name 😎 (which could add a new example to the README for linux)
The text was updated successfully, but these errors were encountered: