Skip to content

Add tag target to guard against version mismatch#23

Merged
meatballhat merged 1 commit into
mainfrom
tag-guard
Nov 6, 2022
Merged

Add tag target to guard against version mismatch#23
meatballhat merged 1 commit into
mainfrom
tag-guard

Conversation

@meatballhat

@meatballhat meatballhat commented Nov 4, 2022

Copy link
Copy Markdown
Member

Given the peculiarity of the "release artifact" containing the version1, it has historically been easy to create a tag that does not match what is reported by the tool, such as version v1.7.0 reporting v1.6.0. This make target is meant to be used in place of running git tag ... directly to help guard against this in the future, e.g.:

$ make tag
Makefile:31: *** TAG_VERSION must be set.  Stop.
$ make tag TAG_VERSION=v1.7.1
--- a/version/gimme
+++ b/version/TAG_VERSION
@@ -1 +1 @@
-v1.6.0
+v1.7.1
make: *** [Makefile:36: .assert-tag-matches-source] Error 1
$ make tag TAG_VERSION=v1.6.0
git tag -s -a -m 'Release v1.6.0' 'v1.6.0'
fatal: tag 'v1.6.0' already exists
make: *** [Makefile:26: tag] Error 128

(edit) Question! Should the embedded version be modified post-tag so that it indicates unreleased? Something like TAG_VERSION + patch bump + -pre like how some tools do it?

Footnotes

  1. it isn't peculiar for the release artifact to contain the version, really, but to "release" the gimme script unaltered from source is an intended use case, so here we are

@meatballhat meatballhat requested a review from a team November 4, 2022 11:58
@brackendawson

Copy link
Copy Markdown
Contributor

What's the release process after this? I am assuming:

  • Run make tag
  • Push the tag to main.
  • Draft a release against that tag.
  • Press 'generate release note'.
  • Publish.

@meatballhat

Copy link
Copy Markdown
Member Author

@brackendawson That's what I have in mind, at least for now 😅 Roughly analogous to what's described here.

@meatballhat meatballhat merged commit 9ae955a into main Nov 6, 2022
@meatballhat meatballhat deleted the tag-guard branch November 6, 2022 14:46
brackendawson added a commit that referenced this pull request Feb 9, 2024
Based on urfave/cli and this conversation: #23 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants