bbolt icon indicating copy to clipboard operation
bbolt copied to clipboard

release: add release script

Open Elbehery opened this issue 11 months ago • 6 comments

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 avatar Feb 10 '25 23:02 Elbehery

@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 :)

ivanvc avatar Feb 10 '25 23:02 ivanvc

@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 :)

done 👍🏽 .. so it was mainly adding "" around vars 👍🏽

Elbehery avatar Feb 11 '25 00:02 Elbehery

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

Elbehery avatar Feb 12 '25 21:02 Elbehery

/retest

Elbehery avatar Mar 14 '25 00:03 Elbehery

@ivanvc am i missing anything here ?

Elbehery avatar Mar 17 '25 15:03 Elbehery

Sorry for the late response. @ivanvc is this PR good to go?

ahrtr avatar May 05 '25 18:05 ahrtr

hello

will update tonight, really lost track of it :'(

Elbehery avatar May 05 '25 18:05 Elbehery

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.

ivanvc avatar May 05 '25 18:05 ivanvc

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

Elbehery avatar May 05 '25 18:05 Elbehery

@ivanvc updated 👍🏽 PTAL

Elbehery avatar May 07 '25 15:05 Elbehery

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 ?

Elbehery avatar May 18 '25 20:05 Elbehery

@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

Elbehery avatar May 19 '25 21:05 Elbehery

/retest

Elbehery avatar May 20 '25 01:05 Elbehery

Thanks for the changes, @Elbehery. I'll test locally in my fork and then provide a review.

ivanvc avatar May 20 '25 18:05 ivanvc

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Jun 04 '25 10:06 k8s-ci-robot

@Elbehery can you backport this PR to release-1.4 and release-1.3, please?

ahrtr avatar Jun 10 '25 12:06 ahrtr