Skip to content

release: add release script #903

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Elbehery
Copy link
Member

@Elbehery Elbehery commented Feb 10, 2025

This PR adds release.sh script to automate the process of releasing bbolt repo.

resolves #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 Elbehery force-pushed the 20250210-add-release-script branch from 0b369bb to 7649a72 Compare February 10, 2025 23:46
@ivanvc
Copy link
Member

ivanvc commented Feb 10, 2025

@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 Elbehery force-pushed the 20250210-add-release-script branch from 7649a72 to d35e27d Compare February 11, 2025 00:20
@Elbehery
Copy link
Member Author

@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 Elbehery force-pushed the 20250210-add-release-script branch 2 times, most recently from 50ecec3 to ff51289 Compare February 11, 2025 15:37
Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request, @Elbehery. I left some comments ✌️

@Elbehery Elbehery force-pushed the 20250210-add-release-script branch 3 times, most recently from f10036b to 5a05933 Compare February 12, 2025 21:18
@Elbehery
Copy link
Member Author

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 Elbehery force-pushed the 20250210-add-release-script branch 3 times, most recently from 9afab2b to fe76a05 Compare February 13, 2025 10:49
Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, @Elbehery. Sorry if there has been a lot of back and forth. I should have tested your script locally (apologies). Thanks again :)

@Elbehery Elbehery force-pushed the 20250210-add-release-script branch from fe76a05 to 0e085bb Compare March 13, 2025 23:29
Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, @Elbehery. Please take a look at my comments.

@Elbehery Elbehery force-pushed the 20250210-add-release-script branch from 0e085bb to f2a654c Compare March 13, 2025 23:47
@Elbehery
Copy link
Member Author

/retest

@Elbehery
Copy link
Member Author

@ivanvc am i missing anything here ?

Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

I tested this in my fork, and it works as expected. It pushes the version update in version/version.go, and creates and pushes a tag.

LGTM. Thanks, @Elbehery.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Elbehery, ivanvc
Once this PR has been reviewed and has the lgtm label, please ask for approval from ahrtr. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@Elbehery Elbehery force-pushed the 20250210-add-release-script branch from f2a654c to 2766874 Compare March 17, 2025 21:30
Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

Hi, @Elbehery. Thanks for the changes. Please take a look at my comments.

@ahrtr
Copy link
Member

ahrtr commented May 5, 2025

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

@Elbehery
Copy link
Member Author

Elbehery commented May 5, 2025

hello

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

@ivanvc
Copy link
Member

ivanvc commented May 5, 2025

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.

@Elbehery
Copy link
Member Author

Elbehery commented May 5, 2025

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 Elbehery force-pushed the 20250210-add-release-script branch from 2766874 to bb59313 Compare May 7, 2025 15:16
@Elbehery
Copy link
Member Author

Elbehery commented May 7, 2025

@ivanvc updated 👍🏽 PTAL

@Elbehery
Copy link
Member Author

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 Elbehery force-pushed the 20250210-add-release-script branch from bb59313 to c152051 Compare May 19, 2025 21:36
@Elbehery
Copy link
Member Author

@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

Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
@Elbehery Elbehery force-pushed the 20250210-add-release-script branch from c152051 to 3062915 Compare May 19, 2025 23:03
@Elbehery
Copy link
Member Author

/retest

@Elbehery Elbehery requested review from ahrtr and ivanvc May 20, 2025 04:07
@ivanvc
Copy link
Member

ivanvc commented May 20, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Create a release.sh to automatically release bbolt
4 participants