-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add script that generates commands for our releases #5913
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
Conversation
@biboudis if you want to write reasonably resilient shellscripts you might be interested in https://github.com/AleksanderBG/bashutil/blob/master/try.sh. It defines a try mkdir "$dir"
try touch "$dir/file"
|
Oh, I forgot to add this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not convinced by this PR. People publishing and pushing directly to master should know what git commands they are running and what they do. This script suggests that you can just run the script, copy paste the output in your terminal and you're good to go.
On the other hand, I think it would be great to document theses step somewhere. Not sure a script that prints the steps is the best format though
#!/usr/bin/env bash | ||
|
||
# Usage: | ||
# RELEASE_DIR=<directory to place fresh clones of projects> ./release.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What it this RELEASE_DIR
. Why not assume this is ran from within the dotty repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I wanted a fresh cloned copy with default remotes etc.
|
||
echo "git tag $RELEASE.0" | ||
|
||
echo "git push --follow-tags --set-upstream origin $RELEASE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why --set-upstream
?
|
||
echo "git tag $RC_RELEASE.0-RC1" | ||
|
||
echo "git push --follow-tags --set-upstream origin $RC_RELEASE.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why --set-upstream
?
|
||
echo "git commit -am 'Set baseVersion to $V_NEXT.0'" | ||
|
||
echo "git push" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git push origin master
. I am wondering if the default pushes all branches. If think it is better to be specific, specially when you're pushing to master
@@ -0,0 +1,70 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script should not assume that origin
is lampepfl/dotty
|
||
RELEASE="$major.$((minor+1))" | ||
|
||
RC_RELEASE="0.$((minor+2))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've been releasing 0.x
stable and 0.(x + 1)-RC1
at the same time but there is no reason it should always be the case
@allanrenucci This was meant to be an auto-generated script towards some level of automation instead of the complete manual way now. @AleksanderBG At this step all commands are echos, for mere manual execution. Not need for resilience at this point. |
This small script, currently, it just generates the necessary commands according to our release. For now it gets the latest release from the list of tags not ending in RCXX. In the future it may be used to fully automate our release process.
Sample output for the current release #5907: