Skip to content
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

Merged
merged 2 commits into from
Aug 24, 2021
Merged

Conversation

Anviking
Copy link
Member

@Anviking Anviking commented Aug 23, 2021

  • 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.

    • Instead of updating the README.md compatibility matrix, we should now review that the script did it correctly.

Issue Number

ADP-1073 (though not scheduled yet)

Comments

Example

Skärmavbild 2021-08-23 kl  16 07 28

Skärmavbild 2021-08-23 kl  16 07 40

diff --git a/scripts/make_release.sh b/scripts/make_release.sh
index 0dcd451cb..28ff1d137 100755
--- a/scripts/make_release.sh
+++ b/scripts/make_release.sh
@@ -19,9 +19,9 @@ set -euo pipefail
 ################################################################################
 # Release-specific parameters. Can be changed interactively by running the script.
 # Release tags must follow format vYYYY-MM-DD.
-GIT_TAG="v2021-08-11"
-OLD_GIT_TAG="v2021-07-30"
-CARDANO_NODE_TAG="alonzo-purple-1.0.1"
+GIT_TAG="v2021-08-23"
+OLD_GIT_TAG="v2021-08-11"
+CARDANO_NODE_TAG="1.29.0-rc2"

 ################################################################################
 # Tag munging functions

diff --git a/README.md b/README.md
index 7712036c9..f374604bf 100644
--- a/README.md
+++ b/README.md
@@ -69,9 +69,9 @@ See **Installation Instructions** for each available [release](https://github.co
 > | cardano-wallet | cardano-node (compatible versions) | SMASH (compatible versions)
 > | --- | --- | ---
 > | `master` branch | [1.29.0-rc2](https://github.com/input-output-hk/cardano-node/releases/tag/1.29.0-rc2) | [1.4.0](https://github.com/input-output-hk/smash/releases/tag/1.4.0)
+> | [v2021-08-23](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2021-08-23) | [1.29.0-rc2](https://github.com/input-output-hk/cardano-node/releases/tag/1.29.0-rc2) | [1.4.0](https://github.com/input-output-hk/smash/releases/tag/1.4.0)
 > | [v2021-08-11](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2021-08-11) | [alonzo-purple-1.0.1](https://github.com/input-output-hk/cardano-node/releases/tag/alonzo-purple-1.0.1) | [1.4.0](https://github.com/input-output-hk/smash/releases/tag/1.4.0)
 > | [v2021-07-30](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2021-07-30) | [1.28.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.28.0) | [1.4.0](https://github.com/input-output-hk/smash/releases/tag/1.4.0)
-> | [v2021-06-11](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2021-06-11) | [1.27.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.27.0) | [1.4.0](https://github.com/input-output-hk/smash/releases/tag/1.4.0)

 ## How to build from sources

diff --git a/docker-compose.yml b/docker-compose.yml
index a863d0ec4..2eab5d254 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,7 +2,7 @@ version: "3.5"

 services:
   cardano-node:
-    image: inputoutput/cardano-node:alonzo-purple-1.0.1
+    image: inputoutput/cardano-node:1.29.0-rc2
     environment:
       NETWORK:
     volumes:
@@ -18,7 +18,7 @@ services:
         max-size: "50m"

   cardano-wallet:
-    image: inputoutput/cardano-wallet:2021.8.11
+    image: inputoutput/cardano-wallet:2021.8.23
     volumes:
       - wallet-${NETWORK}-db:/wallet-db
       - node-ipc:/ipc

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.
@Anviking Anviking self-assigned this Aug 23, 2021
Copy link
Contributor

@rvl rvl left a 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
Copy link
Contributor

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]

Copy link
Member Author

@Anviking Anviking Aug 24, 2021

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep good.

@rvl rvl merged commit f38e52d into master Aug 24, 2021
@rvl rvl deleted the anviking/ADP-1073/improve-release-script branch August 24, 2021 02:07
Anviking added a commit that referenced this pull request Aug 24, 2021
Since #2840 was merged manually, this wasn't caught there.

I re-tested the command, and it seems to still work.
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