-
Notifications
You must be signed in to change notification settings - Fork 670
Support draft and pre-releases in bin/release
#1372
Conversation
I've looked at fixing |
8e01164
to
fa1e2e2
Compare
When publishing pre-releases via the release script we do not want to modify the `latest` tag in DockerHub - specifying UPDATE_LATEST=false causes publish to push to $WEAVE_VERSION only. Omitting the flag entirely retains the existing behaviour for backwards compatability.
To support arbitrarily named pre-releases we no longer impose any restrictions on the format of the most recent annotated tag - instead we expect to find a single annotated tag pointing at HEAD of the current branch and assume this is the version to release.
Pull common checks out to top level in preparation for the introduction of an additional process step.
The publish stage has been split into two pieces - a draft step that creates a draft version release in Github and a publish step that publishes the draft, updates `latest_release` and pushes images to DockerHub. It is also possible to specify `--pre-release` to draft. Once published such a release will be marked with a prominent warning in GitHub; additionally we do not update `latest_release` in GitHub nor push an update to the `latest` tag in DockerHub.
fa1e2e2
to
d2ddd0a
Compare
I have forked
|
Obtain the version and latest_release tag commit hashes before changing into the cloned repository so that all tagging and pushing happens on the outer repository.
d2ddd0a
to
88b7544
Compare
After discussion with @squaremo I have modified the script so that all tag checking operations happen on the outer repository. Since both currently outstanding issues are now addressed, I've included another commit which adds |
1077f04
to
25c08db
Compare
Have tested both mainline and pre-release paths; this PR is ready for review. |
you can just run `./bin/release publish` again. | ||
* If it turns out you released the wrong thing, you can delete the | ||
release on GitHub and start again; it's the only thing that has to | ||
be manually deleted. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
25c08db
to
5744ed8
Compare
Update documentation. |
LGTM I suggest we
|
This PR refactors the
bin/release
script to have three steps:The second step creates the GitHub release in draft state, optionally marked as pre-release; the final step removes the draft state (making the release visible to the outside world) and updates latest in {Git,Docker}Hub only if the pre-release attribute is missing.
Caveats
git-describe
with a--match=v*
to find the most recent version tag. To support non-mainline releases I've had to remove all the 'v' related logic with three consequences:git tag --points-at HEAD
and expects to find a single tag there which it assumes is the version tag. This is slightly less flexible that before, because it means theHEAD
of your local branch must be the tagged commit that you want to buildlatest_release
tag must point at the version tag, not directly at the commit object (e.g. you must now usegit tag -af latest_release v2.0.0
whereas before you could have hadv2.0.0
checked out and donegit tag -af latest_release
). The current release instructions describe the first method anyway, so probably not a big dealOutstanding Issues
github-release edit
command used to remove the draft status resets the description field. I can think of a several solutions to this, none of which are very appealing:github release info
first and then supply it back as an argument togithub-release edit
. Note that the output ofinfo
isn't really amenable to reliable parsing, particularly in the face of the freeform multiline description fieldgithub-release
bin/release publish
, or we could require them to do it first and check at the startlatest_release
tag in the repository cloned intoreleases/
, not in the repository in which they created the version tag and are runningbin/release
. This seems odd - does anyone object to the checks being modified so that they all operate on the 'outer' repository? (Related, there's a bug in the current logic anyway - see the 'Fix latest_release hash test' commit in this PR)@dpw @rade @squaremo particularly interested in your opionions on the caveats and issues - this PR isn't ideal at the moment. Will hold off producing updated release process instructions for the wiki until things are ironed out.
Further explanatory material is available in the individual commit messages.
Fixes #880, fixes #909.