From c93d0dbdf0e21cb48ea65b0f2a56f61255b21b81 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Fri, 21 Feb 2025 11:35:51 +0100 Subject: [PATCH 1/6] doc: improve howto_release.md This PR aims to improve the (complex) release procedure: - re-order creation and use of variables - more use of VERSION variable to avoid manual copy-pasting - propagate the correct VERSION number throughout the procedure --- doc/howto_release.md | 80 +++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/doc/howto_release.md b/doc/howto_release.md index 840fc372e92..29258b69bd3 100644 --- a/doc/howto_release.md +++ b/doc/howto_release.md @@ -82,11 +82,31 @@ For a release, change the version after the RC cycle to an official release: The script will compute the correct version string and print a message containing it into the terminal (e.g., "version: GRASS GIS 3.5.0RC1"). +## Create variables + +For convenience, create Bash variables with the version update script: + +```bash +# Get VERSION and TAG as variables. +eval $(./utils/update_version.py status --bash) +``` + +Version and tag are the same for all releases: + +```bash +echo "$VERSION" +echo "$TAG" +``` + +If in doubt, run the script without `eval $(...)` to see all the variables created. + +## Commit version + Commit with a commit message suggested by the script, e.g.: ```bash git diff -git commit include/VERSION -m "..." +git commit include/VERSION -m "version: $VERSION" ``` If you lost the script output with the suggested message use @@ -106,24 +126,6 @@ Push the commit to the upstream repo: git push upstream ``` -## Create variables - -For convenience, create Bash variables with the version update script: - -```bash -# Get VERSION and TAG as variables. -eval $(./utils/update_version.py status --bash) -``` - -Version and tag are the same for all releases: - -```bash -echo "$VERSION" -echo "$TAG" -``` - -If in doubt, run the script without `eval $(...)` to see all the variables created. - ## Create release tag The tag is created locally, while the release draft is created automatically by @@ -238,6 +240,14 @@ Save the modified draft, but do not publish the release yet. ## Update include/VERSION file +Save the current release version in a variable for later steps. +This will avoid confusion with the version number when switching +back in the VERSION file: + +```bash +export REL_VERSION=$VERSION +``` + Use the dedicated `update_version.py` script to edit the VERSION file. After a RC, update to development version: @@ -298,22 +308,16 @@ First, update the repo to get the tag locally: git fetch upstream ``` -Get the tagged source code, e.g. (modify the tag as needed): - -```bash -git checkout 8.4.0RC1 -``` - -Create the Bash variables for version numbers: +Verify the version (it should match exactly the tag specified above): ```bash -eval $(./utils/update_version.py status --bash) +echo "$REL_VERSION" ``` -Confirm the version (it should match exactly the tag specified above): +Get the tagged source code, e.g. (modify the tag as needed): ```bash -echo "$VERSION" +git checkout $REL_VERSION ``` ### Get changelog file for upload @@ -323,8 +327,8 @@ fetch the file from the release which was generated by a workflow linked to the tag: ```bash -wget https://github.com/OSGeo/grass/releases/download/${VERSION}/ChangeLog.gz \ - -O ChangeLog_${VERSION}.gz +wget https://github.com/OSGeo/grass/releases/download/$REL_VERSION/ChangeLog.gz \ + -O ChangeLog_$REL_VERSION.gz ``` ### Get the source code tarball @@ -332,8 +336,8 @@ wget https://github.com/OSGeo/grass/releases/download/${VERSION}/ChangeLog.gz \ Fetch a tarball from GitHub we also publish on OSGeo servers: ```bash -wget https://github.com/OSGeo/grass/archive/${VERSION}.tar.gz -O grass-${VERSION}.tar.gz -md5sum grass-${VERSION}.tar.gz > grass-${VERSION}.md5sum +wget https://github.com/OSGeo/grass/archive/$REL_VERSION.tar.gz -O grass-$REL_VERSION.tar.gz +md5sum grass-$REL_VERSION.tar.gz > grass-$REL_VERSION.md5sum ``` ### Upload source code tarball to OSGeo servers @@ -354,19 +358,19 @@ eval $(ssh-agent) && ssh-add # upload along with associated files, creating target dir if still needed ssh $USER@$SERVER1 "mkdir -p $SERVER1DIR" -scp -p grass-$VERSION.* AUTHORS COPYING ChangeLog_$VERSION.gz \ +scp -p grass-$REL_VERSION.* AUTHORS COPYING ChangeLog_$REL_VERSION.gz \ INSTALL.md REQUIREMENTS.md CONTRIBUTING.md $USER@$SERVER1:$SERVER1DIR ssh $USER@$SERVER2 "mkdir -p $SERVER2DIR" -scp -p grass-$VERSION.* AUTHORS COPYING ChangeLog_$VERSION.gz \ +scp -p grass-$REL_VERSION.* AUTHORS COPYING ChangeLog_$REL_VERSION.gz \ INSTALL.md REQUIREMENTS.md CONTRIBUTING.md $USER@$SERVER2:$SERVER2DIR # Only at full release (i.e., not for RCs)! # generate link to "latest" source code ssh $USER@$SERVER1 "cd $SERVER1DIR ; rm -f grass-$MAJOR.$MINOR-latest.tar.gz" -ssh $USER@$SERVER1 "cd $SERVER1DIR ; ln -s grass-$VERSION.tar.gz grass-$MAJOR.$MINOR-latest.tar.gz" +ssh $USER@$SERVER1 "cd $SERVER1DIR ; ln -s grass-$REL_VERSION.tar.gz grass-$MAJOR.$MINOR-latest.tar.gz" ssh $USER@$SERVER1 "cd $SERVER1DIR ; rm -f grass-$MAJOR.$MINOR-latest.md5sum" -ssh $USER@$SERVER1 "cd $SERVER1DIR ; ln -s grass-$VERSION.tar.md5sum grass-$MAJOR.$MINOR-latest.md5sum" +ssh $USER@$SERVER1 "cd $SERVER1DIR ; ln -s grass-$REL_VERSION.tar.md5sum grass-$MAJOR.$MINOR-latest.md5sum" # verify echo "https://grass.osgeo.org/grass$MAJOR$MINOR/source/" @@ -375,7 +379,7 @@ echo "https://grass.osgeo.org/grass$MAJOR$MINOR/source/" ### Update redirects For final minor and major releases (not release candidates and micro releases), -update `grass-stable` redirect at `osgeo7-grass`: +update `grass-stable` redirect at `osgeo8-grass`: ```bash sudo vim /etc/apache2/sites-enabled/000-default.conf From 63e7ad7e4a210aefdeb4c89e34ab2b0508d4d4d0 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Fri, 21 Feb 2025 17:03:43 +0100 Subject: [PATCH 2/6] fix commit msg --- doc/howto_release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/howto_release.md b/doc/howto_release.md index 29258b69bd3..888db5993a2 100644 --- a/doc/howto_release.md +++ b/doc/howto_release.md @@ -106,7 +106,7 @@ Commit with a commit message suggested by the script, e.g.: ```bash git diff -git commit include/VERSION -m "version: $VERSION" +git commit include/VERSION -m "version: GRASS GIS $VERSION" ``` If you lost the script output with the suggested message use From ed9c5c1d4895a676a5f59508d22e7372b194d064 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Mon, 24 Feb 2025 13:15:14 +0100 Subject: [PATCH 3/6] expand text on creating release draft --- doc/howto_release.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/howto_release.md b/doc/howto_release.md index 888db5993a2..bff87c56f1a 100644 --- a/doc/howto_release.md +++ b/doc/howto_release.md @@ -224,10 +224,10 @@ if there are any. ### Modify the release draft After the automated release job completes, a new release draft will be available -in the GitHub web interface. You can copy-paste the created release notes to -GitHub and further modify as needed. - -Older release description may or may not be a good inspiration: +in the [GitHub releases web interface](https://github.com/OSGeo/grass/releases). +You can copy-paste the locally created release notes to GitHub and further modify +in the web interface as needed, following the typical document structure. +Here, older release description may or may not be a good inspiration: . If RC, mark it as a pre-release, check: From 3ec8729e03264504c24e8d32c3fda1fdfa2c80ec Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Mon, 24 Feb 2025 16:36:16 +0100 Subject: [PATCH 4/6] sync VERSION file wording to utils/update_version.py --- doc/howto_release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/howto_release.md b/doc/howto_release.md index bff87c56f1a..abf11e9cfa9 100644 --- a/doc/howto_release.md +++ b/doc/howto_release.md @@ -271,7 +271,7 @@ Eventually, commit with the suggested commit message and push, e.g.: ```bash git show eval $(./utils/update_version.py status --bash) -git commit include/VERSION -m "version: Back to $VERSION" +git commit include/VERSION -m "version: Start $VERSION" git push upstream ``` From 9e4a6afcf5be3ef55c417ffd7b7e4ddc284fc737 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Mon, 24 Feb 2025 18:10:10 +0100 Subject: [PATCH 5/6] updated wget command to use correct URL --- doc/howto_release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/howto_release.md b/doc/howto_release.md index abf11e9cfa9..f51ff81d23d 100644 --- a/doc/howto_release.md +++ b/doc/howto_release.md @@ -336,7 +336,7 @@ wget https://github.com/OSGeo/grass/releases/download/$REL_VERSION/ChangeLog.gz Fetch a tarball from GitHub we also publish on OSGeo servers: ```bash -wget https://github.com/OSGeo/grass/archive/$REL_VERSION.tar.gz -O grass-$REL_VERSION.tar.gz +wget https://github.com/OSGeo/grass/releases/download/$REL_VERSION/grass-$REL_VERSION.tar.gz md5sum grass-$REL_VERSION.tar.gz > grass-$REL_VERSION.md5sum ``` From b7f8f8f1a758f904e343ab296887fd9ea681afe4 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Tue, 25 Feb 2025 10:18:54 +0100 Subject: [PATCH 6/6] Add the Zenodo badge to the release description --- doc/howto_release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/howto_release.md b/doc/howto_release.md index f51ff81d23d..1438d1194bc 100644 --- a/doc/howto_release.md +++ b/doc/howto_release.md @@ -434,7 +434,7 @@ Release is done. For final releases only, go to [Zenodo](https://doi.org/10.5281/zenodo.5176030) and get a Markdown badge for the release which Zenodo creates with a DOI -for the published release. +for the published release. Add the badge to the release description. For all releases, click the Binder badge to get Binder to build. Use it to test it and to cache the built image. Add more links to (or badges for) more notebooks