-
Notifications
You must be signed in to change notification settings - Fork 217
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
Improve ./scripts/make_release.sh #2840
Conversation
1. Remove need to edit the parameters in the file itself. Instead promt the caller through stdin using sensible defaults. 2. Automatically update the list of releases in README.md. The code is somewhat fragile, but still better than doing it manually.
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.
Thanks
GIT_TAG=$new_tag | ||
|
||
OLD_CARDANO_NODE_TAG=$CARDANO_NODE_TAG | ||
read -e -p "Cardano node tag: " -i "$CARDANO_NODE_TAG" CARDANO_NODE_TAG |
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.
I don't like scripts which ask questions. CLI args are better, something like:
usage: ./scripts/make_release.sh ( today | vYYYY-MM-DD ) [CARDANO_NODE_TAG]
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.
Normally I'd agree with you, but here I'm after interactivity and a low learning curve.
This way the user gets provided sensible defaults, but has the responsibility to review those defaults.
If you want to make a release tag for tomorrow, you can simply change the last digit of the default tag. You don't have to make the full jump from the automatic today
to the manual v2021-08-24
.
echo | ||
if [[ $REPLY =~ ^[Yy]$ ]] | ||
then | ||
msg="Bump version from $OLD_CABAL_VERSION to $CABAL_VERSION" | ||
git diff --quiet || git commit -am "$msg" | ||
git tag -s -m "$GIT_TAG" "$GIT_TAG" |
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.
Yep good.
Since #2840 was merged manually, this wasn't caught there. I re-tested the command, and it seems to still work.
Remove need to edit the parameters in the file itself. Instead promt the caller through stdin using sensible defaults.
Automatically update the list of releases in README.md. The code is
somewhat fragile, but still better than doing it manually.
Close to merging: Update release checklist.
Issue Number
ADP-1073 (though not scheduled yet)
Comments
Example