-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/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 commentThe reason will be displayed to describe this comment to others. Learn more. What it this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because I wanted a fresh cloned copy with default remotes etc. |
||
|
||
set -e | ||
|
||
# TODO: clone all the projects | ||
# cd $RELEASE_DIR | ||
# [email protected]:lampepfl/dotty | ||
# git clone [email protected]:lampepfl/dotty-example-project.git | ||
# git clone --single-branch --branch mill [email protected]:lampepfl/dotty-example-project.git | ||
# git clone [email protected]:lampepfl/dotty.g8.git | ||
# git clone [email protected]:lampepfl/dotty-cross.g8.git | ||
# git clone [email protected]:lampepfl/homebrew-brew.git | ||
# git clone [email protected]:lampepfl/packtest.git | ||
# git clone [email protected]:scalacenter/scastie/.git | ||
|
||
# Parsing latest release from the list of tags not ending in RCX | ||
version=($(git tag --list '*.0' --sort=v:refname | tail -n1 | tr '.' '\n')) | ||
|
||
major=${version[0]} | ||
minor=${version[1]} | ||
build=${version[2]} | ||
|
||
LAST_RELEASE="$major.$minor" | ||
|
||
RELEASE="$major.$((minor+1))" | ||
|
||
RC_RELEASE="0.$((minor+2))" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We've been releasing |
||
|
||
V_NEXT="0.$((minor+3))" | ||
|
||
echo "cd $RELEASE_DIR/dotty" | ||
|
||
echo "git checkout $RELEASE.x" | ||
|
||
echo "sed -i '' 's/^\([[:blank:]]*\)val baseVersion = \"$RELEASE.0-RC1\".*/\1val baseVersion = \"$RELEASE.0\"/' project/Build.scala" | ||
|
||
echo "git commit -am 'Release Dotty $RELEASE.0'" | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Why |
||
|
||
echo "git checkout master" | ||
|
||
echo "git merge $RELEASE.x" | ||
|
||
echo "git push" | ||
|
||
echo "git checkout -b $RC_RELEASE.x" | ||
|
||
echo "sed -i '' 's/^\([[:blank:]]*\)val baseVersion = \"$RELEASE.0\".*/\1val baseVersion = \"$RC_RELEASE.0-RC1\"/' project/Build.scala" | ||
|
||
echo "git commit -am 'Release Dotty $RC_RELEASE.0-RC1'" | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Why |
||
|
||
echo "git checkout master" | ||
|
||
echo "sed -i '' 's/^\([[:blank:]]*\)val baseVersion = \"$RC_RELEASE.0\".*/\1val baseVersion = \"$V_NEXT.0\"/' project/Build.scala" | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# TODO: perform all the version bumps, commit, push and create the PRs |
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
islampepfl/dotty