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

Tag release script #107

Merged
merged 5 commits into from
Jun 2, 2023
Merged

Tag release script #107

merged 5 commits into from
Jun 2, 2023

Conversation

ortex
Copy link
Member

@ortex ortex commented Jun 2, 2023

#106

➜  roc-go git:(main) ✗ ./tag.py 0.1111
Error: version "0.1111" is not in correct format
➜  roc-go git:(main) ✗ ./tag.py 0.2.1        
Error: tag "v0.2.1" already exists
➜  roc-go git:(main) ✗ ./tag.py --push ortex 0.2.2
[main 51d8c36] Release 0.2.2
 1 file changed, 1 insertion(+), 1 deletion(-)
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 10 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 348 bytes | 348.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To github.com:ortex/roc-go.git
   0df41a5..51d8c36  HEAD -> main
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:ortex/roc-go.git
 * [new tag]         v0.2.2 -> v0.2.2
Successfully released v0.2.2

result: ortex@51d8c36

@ortex ortex added the ready for review Pull request can be reviewed label Jun 2, 2023
@coveralls
Copy link
Collaborator

coveralls commented Jun 2, 2023

Coverage Status

coverage: 94.878%. remained the same when pulling c347235 on tag-release into 0df41a5 on main.

@ortex ortex force-pushed the tag-release branch 2 times, most recently from 0043bc9 to 739cbc9 Compare June 2, 2023 07:20
@gavv
Copy link
Member

gavv commented Jun 2, 2023

Suggestions:

  • I think it would be convenient to allow leading "v" in argument, so that 1.2.3 and v1.2.3 would be equivalent. I guess we will often forget whether "v" is needed or not :)

  • There is a convenient way to replace text in file using fileinput module https://stackoverflow.com/a/20593644/3169754

  • I'd relax search pattern for "bindingsVersion". Don't assume "var" (it may be on another line or be "const"), instead search for bindingsVersion = "..." with arbitrary number of spaces around "=".

  • Let's log to console all command we run and actions like modifying file.

  • Let's print errors to stderr instead of stdout.

  • Let's use exit(1) when exiting with error.

@gavv
Copy link
Member

gavv commented Jun 2, 2023

Ideally we also need "-f" option that will forcibly override tag both locally and remotely. We can add it in this pr or create a separate issue.

@gavv
Copy link
Member

gavv commented Jun 2, 2023

It also would be convenient to automatically change directory to project root at start, to allow invocation from any directory. I think we can assume that the script is in project root and chdir to script's dir.

@gavv gavv added needs revision Pull request should be revised by its author and removed ready for review Pull request can be reviewed labels Jun 2, 2023
@ortex
Copy link
Member Author

ortex commented Jun 2, 2023

fixed everything except "-f" option

@gavv gavv merged commit 4664001 into main Jun 2, 2023
@gavv gavv deleted the tag-release branch June 2, 2023 18:19
@gavv
Copy link
Member

gavv commented Jun 2, 2023

LGTM!

@gavv gavv removed the needs revision Pull request should be revised by its author label Jun 2, 2023
@gavv
Copy link
Member

gavv commented Jun 2, 2023

#108

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.

3 participants