1Password / onepassword-sdk-go

https://developer.1password.com/docs/sdks/
MIT License
40 stars 3 forks source link

Fix unnoticed release bugs #91

Closed MOmarMiraj closed 2 months ago

MOmarMiraj commented 3 months ago

On the release process, if its on a feature branch, it will not push the branch as its expecting the new branch name in format of "rc/..." but the feature branch could be anything.

Also the comparison between current build number and new build number would be incorrect at certain numbers as bash treats leading 0's as an octal number. This fixes it so it converts to base 10 and compares.

This MR will fix these bugs.

AndyTitu commented 2 months ago

I omitted this before, but we should make sure that if the script fails, or it is closed somewhere down the line (via ctrl + C for example), the state is cleaned, so there are no dangling files left in the diff that could be committed and released by the make release script, if the make prep-release script failed.

We could achieve that by trapping the ERR signal: https://stackoverflow.com/questions/2129923/how-to-run-a-command-before-a-bash-script-exits

This is a nice opportunity to read up on Signals in general: https://en.wikipedia.org/wiki/Signal_(IPC)