mattf-apache commented on a change in pull request #1643:
URL: https://github.com/apache/hbase/pull/1643#discussion_r420508959
##########
File path: dev-support/create-release/release-build.sh
##########
@@ -20,114 +20,180 @@
trap cleanup EXIT
# Source in utils.
-SELF=$(cd $(dirname $0) && pwd)
+SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+# shellcheck source=SCRIPTDIR/release-util.sh
. "$SELF/release-util.sh"
# Print usage and exit.
function exit_with_usage {
- cat << EOF
-Usage: release-build.sh <build|publish-snapshot|publish-release>
-Creates build deliverables from a tag/commit.
-Arguments:
- build Create binary packages and commit to
dist.apache.org/repos/dist/dev/hbase/
- publish-snapshot Publish snapshot release to Apache snapshots
- publish-release Publish a release to Apache release repo
-
-All other inputs are environment variables:
- GIT_REF - Release tag or commit to build from
- PACKAGE_VERSION - Release identifier in top level package directory (e.g.
2.1.2RC1)
- VERSION - (optional) Version of project being built (e.g. 2.1.2)
- ASF_USERNAME - Username of ASF committer account
- ASF_PASSWORD - Password of ASF committer account
- GPG_KEY - GPG key used to sign release artifacts
- GPG_PASSPHRASE - Passphrase for GPG key
- PROJECT - The project to build. No default.
-
-Set REPO environment to full path to repo to use
-to avoid re-downloading dependencies on each run.
+ cat <<'EOF'
+Usage: release-build.sh <tag|publish-dist|publish-snapshot|publish-release>
+Creates release deliverables from a tag or commit.
+Argument: one of 'tag', 'publish-dist', 'publish-snapshot', or
'publish-release'
+ tag Prepares for release on specified git branch: Set release
version,
+ update CHANGES and RELEASENOTES, create release tag,
+ increment version for ongoing dev, and publish to Apache
git repo.
+ publish-dist Build and publish distribution packages (tarballs) to
Apache dist repo
+ publish-snapshot Build and publish maven artifacts snapshot release to
Apache snapshots repo
+ publish-release Build and publish maven artifacts release to Apache
release repo, and
Review comment:
If you don't specify a step, it will do `tag`, `publish-dist` (formerly
misnamed as "build"), and `publish-release`, in that order.
The business with staging repo in Nexus is part of the `publish-release`
step. I did not change its basic logic, which is now in
release-util.sh::maven_deploy():
1. Use mvn to set the version in pom.xml
1. Do `mvn deploy` to Nexus, using `-P apache-release,release` profiles,
which use the maven-release-plugin, nexus-staging-maven-plugin, and configs
from the HBase top-level pom and root ASF pom, to manage Nexus deployment.
1. Afterward (back to release-build.sh, at the end of `publish-release`
step), the code expects to find that the Staging Repo has been closed, and
returns the repo ID to the user. Note that for snapshot releases, the Staging
Repo intermediate appears not to be used.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]