release: add release script
This PR adds release.sh script to automate the process of releasing bbolt repo.
resolves https://github.com/etcd-io/bbolt/issues/896
Below is output of release.sh run
melbeher@melbeher-mac bbolt % ./scripts/release.sh version_20250212
enter release string according to semantic versioning (e.g. v1.2.3).
v1.4.0-beta.15
fatal: a branch named 'version_20250212' already exists
Updating version from '1.4.0-alpha.0' to '1.4.0-beta.15' in 'version.go'
committing 'version.go'
[version_20250212 234b458] Update version to 1.4.0-beta.15
1 file changed, 1 insertion(+), 1 deletion(-)
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 379 bytes | 379.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:Elbehery/bbolt.git
+ 9ad97a4...234b458 version_20250212 -> version_20250212 (forced update)
branch 'version_20250212' set up to track 'origin/version_20250212'.
'version.go' has been committed to remote repo.
Creating new tag for 'v1.4.0-beta.15'
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To github.com:Elbehery/bbolt.git
* [new tag] v1.4.0-beta.15 -> v1.4.0-beta.15
Tag 'v1.4.0-beta.15' has been created and pushed to remote repo.
SUCCESS
@Elbehery, we don't have a shellcheck CI check here (yet). Can you run shellcheck on your script? I believe there are a couple of instances where it will give warnings :)
@Elbehery, we don't have a
shellcheckCI check here (yet). Can you run shellcheck on your script? I believe there are a couple of instances where it will give warnings :)
done 👍🏽 .. so it was mainly adding "" around vars 👍🏽
the last run after updates
melbeher@melbeher-mac bbolt % ./scripts/release.sh version_20250212
enter release string according to semantic versioning (e.g. v1.2.3).
v1.4.0-beta.15
fatal: a branch named 'version_20250212' already exists
Updating version from '1.4.0-alpha.0' to '1.4.0-beta.15' in 'version.go'
committing 'version.go'
[version_20250212 234b458] Update version to 1.4.0-beta.15
1 file changed, 1 insertion(+), 1 deletion(-)
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 379 bytes | 379.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:Elbehery/bbolt.git
+ 9ad97a4...234b458 version_20250212 -> version_20250212 (forced update)
branch 'version_20250212' set up to track 'origin/version_20250212'.
'version.go' has been committed to remote repo.
Creating new tag for 'v1.4.0-beta.15'
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To github.com:Elbehery/bbolt.git
* [new tag] v1.4.0-beta.15 -> v1.4.0-beta.15
Tag 'v1.4.0-beta.15' has been created and pushed to remote repo.
SUCCESS
/retest
@ivanvc am i missing anything here ?
Sorry for the late response. @ivanvc is this PR good to go?
hello
will update tonight, really lost track of it :'(
Sorry for the late response. @ivanvc is this PR good to go?
No, we're missing changes from the last batch of comments. The script, as it is right now, would fail to execute.
Sorry for the late response. @ivanvc is this PR good to go?
No, we're missing changes from the last batch of comments. The script, as it is right now, would fail to execute.
I deeply apologize, has lost track of this
will update tonight
@ivanvc updated 👍🏽 PTAL
Hello ✋🏽
I have just tested this, find the output below
./scripts/release.sh version_20250518
enter release string according to semantic versioning (e.g. v1.2.3).
v1.4.0-beta.15
fatal: a branch named 'version_20250518' already exists
Updating version from '1.4.0-alpha.0' to '1.4.0-beta.15' in 'version.go'
committing 'version.go'
[version_20250518 681aa33] Update version to 1.4.0-beta.15
1 file changed, 1 insertion(+), 1 deletion(-)
'version.go' has been committed to remote repo.
Creating new tag for 'v1.4.0-beta.15'
gpg: directory '/Users/melbeher/.gnupg' created
gpg: /Users/melbeher/.gnupg/trustdb.gpg: trustdb created
gpg: error reading key: No public key
I just don't have the config correct, but any more changes required here ?
@ivanvc updated, now everything happens in the release-{MINOR} branch
see below run of current script
./scripts/release.sh
enter release string according to semantic versioning (e.g. v1.2.3).
v1.4.0-beta.15
Switched to a new branch 'release_1.4'
Updating version from '1.4.0-alpha.0' to '1.4.0-beta.15' in 'version.go'
committing 'version.go'
[release_1.4 6bbe051] Update version to 1.4.0-beta.15
1 file changed, 1 insertion(+), 1 deletion(-)
'version.go' has been committed to remote repo.
Creating new tag for 'v1.4.0-beta.15'
gpg: error reading key: No public key
/retest
Thanks for the changes, @Elbehery. I'll test locally in my fork and then provide a review.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: ahrtr, Elbehery, ivanvc
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [ahrtr]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@Elbehery can you backport this PR to release-1.4 and release-1.3, please?