-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build standalone script edition in CI #299
Conversation
Unfortunately due to the way GitHub Actions is setup the standalone version artifact attached to each CI run here can only be downloaded as a zip file. You can see it as built for this PR here. This isn't very conducive to oneliners, but I think that's okay. If people are going to script this they shouldn't be using some random CI run artifact anyway. The standalone script attached to each release should download as a bare script ready for execution by a shell. It's kind of hard to test that until we actually tag a release, but I'll try to do a prerelease on my fork and see if it works there. |
What about "hosting" on https://pages.github.com/ ? We could have a shell script there. Minor nit, |
Yes, this could be hosted on GitHub pages. What would be the advantage to that over attaching the script to releases? The disadvantage I see in moving to Pages is the disconnect from the tagged versions. Of course we could host multiple versions there with something matching the tag versions, but with artifacts attached to releases the relation to the release cycle seems more clear and it would encourage people to use a tagged version while still giving the option of using the |
I don't have a problem with I don't know if there will be use for any other build types, but does |
That it's |
I think it makes slightly more sense, yes. |
The standalone scripts attachments to releases will not be ZIPs anyway, they should download as plain text ready for reading by a POSIX shell. That caveat only applied to the CI runs for every commit/PR. |
For a real preview of what I expect this to look like, I tagged a sample release on my fork. Check out this simulated v1.9.0 release. See the artifacts? Is that clear that there is a source release (tar.xz and zip) plus a standalone raw shell script attached? For testing you should be able to: $ curl -fsLOJS https://github.com/alerque/vcsh/releases/download/v1.9.0/vcsh-standalone.sh ...for direct download of the script via the tag or: $ curl -fsLOJS https://github.com/alerque/vcsh/releases/latest/download/vcsh-standalone.sh ...for the latest keyword version with no tag name required. (Note the reversal of path segments when using the keyword is correct!) |
f03993d
to
ba2c3c6
Compare
My previous implementation only used the configure step from autoconf. Technically in this case it should have been enough, but it’s also kind of an abuse of the tools, it was meant to have another stage. This uses the tools as they were designed, which in my history with autoconf is always easier to maintain. Also it gives us the option of using more features or doing more fancy things in an install step without the standalone versions being out of sync from system installed versions.
ba04951
to
6142deb
Compare
The number of options that needed to be set to get a proper standalone build is fairly large. Given that it was already repeated twice in different CI contexts it occurred to me the whole batch of settings should just be one preset so that people can build their own standalone version easily from the source tarball if they want.
c000663
to
a9478f7
Compare
Sorry for the noisy pushes in this PR, most of them don't have any bearing on the discussion above. I was using this as as excuse to shake down the CI jobs handling lint/test/build/release chores. The process seems pretty solid now, for example here is a simulated v1.9.1 release where the build artifacts (source dist plus standalone script) as well as the changelog notes are all posted automatically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits, else LGTM, thanks!
It's a tad noisy but my workflow hides most of this, no worries. And thanks for actually doing the work! :) |
Co-authored-by: Richard Hartmann <[email protected]>
Thanks @alerque and @RichiH for all of the work and review on this! Sorry if I missed this, but is there an issue or PR to track the first release that will contain this and make https://github.com/RichiH/vcsh/blob/main/doc/INSTALL.md reflect reality? |
Good point. #301 is the tracking issue which will result in a new release being built. |
Fixes #202.
I debated whether to call this special build "bootstrap" or "standalone". In the end "standalone" made more sense to me, but if anybody has a stronger opinion mine is pretty weak.
The idea is to just use the existing build system but tweak it to:
$PATH
will work at runtime-standalone
segment to the version string so bug reports are easier to identifycurl -fsLOJS https://github.com/RichiH/vcsh/releases/latest/download/vcsh-standalone.sh