-
Notifications
You must be signed in to change notification settings - Fork 184
[FLINK-15931] [release] Add tool scripts for releasing #14
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
This adds utility scripts for the following functionality: * Create a new release branch * Update POM versions in current branch, and creates a commit * Create a source release package * Deploying Maven artifacts to Apache staging area
igalshilman
left a comment
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.
Thanks for working on this, and brining statefun one step closer to a releasable Apache project.
I have left some comments to make the script a bit more robust, but the general looks of it seems great.
| ## | ||
| ## Required variables | ||
| ## | ||
| RELEASE_VERSION=${RELEASE_VERSION} |
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.
It seems like a redundant assignment, am I missing some bash-foo :-)
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.
@igalshilman its there to avoid Unresolved variable warnings later in the script when using the variable.
|
|
||
| TAG_COMMIT_MSG="Apache Flink Stateful Functions, release ${RELEASE_VERSION}" | ||
| if [ "${RELEASE_CANDIDATE}" != "none" ]; then | ||
| TAG_COMMIT_MSG="${TAG_COMMIT_MSG} candidate #${RELEASE_CANDIDATE}" |
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.
The TAG_COMMIT_MESSAGE is unused.
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.
Oops, good catch.
|
|
||
| ########################### | ||
|
|
||
| cd ${PROJECT_ROOT} |
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.
It is a good practice to test for a file that you would expect to see here, for example pom.xml, or README.md.
This would help if the shell script would be moved outside it’s current location.
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.
Good point.
| cd ${PROJECT_ROOT} | ||
|
|
||
| #change version in all pom files | ||
| find . -name 'pom.xml' -type f -exec perl -pi -e 's#<version>(.*)'${OLD_VERSION}'(.*)</version>#<version>${1}'${NEW_VERSION}'${2}</version>#' {} \; |
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.
There is a maven command for this,
See https://www.mojohaus.org/versions-maven-plugin/examples/set.html
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'll still keep this script and encourage its usage, since this script handles doc version string updates.
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.
For example, there is a version string in the README as well.
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'll change the Maven POM update part to mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${NEW_VERSION}.
|
Thanks for the review @igalshilman! I've addressed the comments. |
…ease scripts This closes apache#14.
This adds utility scripts for the following functionality:
This scripts are adopted from
apache/flinkwith modifications to suit Stateful Functions.Example usage:
This checkouts a new branch (with no additional changes) named
release-1.2.3This updates all POM files, and creates a commit for the changes.
This creates a
releasedirectory in the project root, containing the source tarballflink-statefun-1.2.3-src.tgzand signatures.This builds the project and deploys artifacts to be staged at repository.apache.org.