diff --git a/RELEASING.md b/RELEASING.md index 1f12fef3e2..129335a202 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -62,8 +62,9 @@ a snapshot to https://repo.akka.io/snapshots from any branch. ## Release steps -* Do a `project/scripts/release ` dry run -* If all goes well, `project/scripts/release --real-run ` +* Tag the release: `git tag -am "Version 2.6.x" v2.6.x` +* Do a `project/scripts/release` dry run +* If all goes well, `project/scripts/release --real-run` * Log into sonatype, 'close' the staging repo. * Test the artifacts by adding `resolvers += "Staging Repo" at "https://oss.sonatype.org/content/repositories/comtypesafe-xxxx"` to a test project * If all is well, 'release' the staging repo. diff --git a/project/scripts/release b/project/scripts/release index 9670ec1366..a5babb8363 100755 --- a/project/scripts/release +++ b/project/scripts/release @@ -76,9 +76,9 @@ # # Run the script in two stages. # First a dry run: -# shell> project/scripts/release +# shell> project/scripts/release # And if all goes well a real run: -# shell> project/scripts/release --real-run +# shell> project/scripts/release --real-run # # The artifacts published to oss.sonatype.org needs to be released by following the # instructions under release here @@ -117,7 +117,7 @@ declare -r script_dir="$(cd -P "$(dirname "${script_path}")" && pwd)" function usage { cat <&1 | grep -E "java version|openjdk version" | cut -d '"' -f2 | cut -d '.' -f1` @@ -215,8 +209,6 @@ function git_cleanup { echoerr "Cleaning up..." safely git reset --hard safely git clean -f - local tags=$(git tag -l) - [[ "${tags}" == *v${version}* ]] && safely git tag -d v${version} } # clean up and fail the script with an error message @@ -241,7 +233,13 @@ function try { "$@" || bail_out "Failed to create release" } -echolog "Creating release ${version} ..." +declare -r version=$(get_current_version) + +if [ ${#version} -gt 6 ]; then + fail "Version [$version] is too long to be a regular release, have you created a tag?" +fi + +echolog "Creating release ${version}..." if [ $dry_run ]; then echodry "Building everything but not pushing release" @@ -255,14 +253,6 @@ fi echolog "Checking ssh connection to ${release_server}" try ssh -t ${release_server} echo "Successfully contacted release server." -echolog "Getting current project version from sbt..." -declare -r current_version=$(get_current_version) -echolog "Current version is ${current_version}" - -if [ "${current_version:0:3}" != "${version:0:3}" ]; then - fail "Releasing $version from wrong branch with version $current_version" -fi - # start clean try sbt clean @@ -273,6 +263,13 @@ if [ $run_tests ]; then echolog "All tests are green" fi +# check binary compatibility for dry run +if [ ! $no_mima ] && [ $dry_run ]; then + echodry "Running migration manager report..." + try sbt $RELEASE_OPT +mimaReportBinaryIssues + echodry "Finished migration manager report" +fi + # build the release echolog "Building the release..." if [ ! $dry_run ]; then @@ -281,26 +278,18 @@ else RELEASE_OPT="-Dakka.genjavadoc.enabled=true" fi -# tag this release -echolog "Tagging..." -try git tag -am "Version ${version}" v${version} - +# Release artifacts try sbt $RELEASE_OPT +buildRelease + +echolog "Successfully created released artifacts" + +# Build the docs try sbt $RELEASE_OPT buildDocs -echolog "Successfully created local release" - -# check binary compatibility for dry run -if [ ! $no_mima ] && [ $dry_run ]; then - echodry "Running migration manager report..." - try sbt $RELEASE_OPT +mimaReportBinaryIssues - echodry "Finished migration manager report" -fi +echolog "Successfully created docs" try sbt $RELEASE_OPT whitesourceCheckPolicies -# the point of no return... we're now pushing out to servers - # use a special failure from now on function arrgh { cat 1>&2 <