Skip to content
Permalink
Browse files
This closes #150
  • Loading branch information
ahgittin committed Dec 20, 2019
2 parents dadcf3e + ab40e59 commit 88d41e43aee62f2df6f783ba94a9662c89379b37
Showing 3 changed files with 14 additions and 21 deletions.
@@ -102,10 +102,10 @@ echo >&2 "The continuing version is: ${continue_version}"
confirm || exit

cat <<EOF
OLD_MASTER_VERSION=${current_version}
NEW_MASTER_VERSION=${continue_version}
VERSION_NAME=${release_version}
RC_NUMBER=${rc_suffix}
SUBMODULES="$( perl -n -e 'if ($_ =~ /path += +(.*)$/) { print $1." " }' < .gitmodules )"
MODULES=". \${SUBMODULES}"
export OLD_MASTER_VERSION=${current_version}
export NEW_MASTER_VERSION=${continue_version}
export VERSION_NAME=${release_version}
export RC_NUMBER=${rc_suffix}
export SUBMODULES="$( perl -n -e 'if ($_ =~ /path += +(.*)$/) { print $1." " }' < .gitmodules )"
export MODULES=". \${SUBMODULES}"
EOF
@@ -175,9 +175,7 @@ mkdir -p ${src_staging_dir}
# * sandbox (which hasn't been vetted so thoroughly)
# * release (where this is running, and people who *have* the release don't need to make it)
# * jars and friends (these are sometimes included for tests, but those are marked as skippable,
# * cli/vendor - that's not source controlled and not removed by mvn clean so ignore it in case it's already there
# and apache convention does not allow them in source builds; see PR #365
rsync -rtp --exclude .git\* --exclude brooklyn-docs/ --exclude brooklyn-library/sandbox/ --exclude brooklyn-client/cli/vendor/ --exclude brooklyn-dist/release/ --exclude '**/*.[ejw]ar' . ${staging_dir}/${release_name}-src
rsync -rtp --exclude .git\* --exclude brooklyn-docs/ --exclude brooklyn-library/sandbox/ --exclude brooklyn-dist/release/ --exclude '**/*.[ejw]ar' . ${staging_dir}/${release_name}-src

rm -rf ${artifact_dir}
mkdir -p ${artifact_dir}
@@ -200,9 +198,9 @@ mkdir -p ${bin_staging_dir}

# Perform the build
if [ -z "${dry_run}" ]; then
( cd ${src_staging_dir} && mvn deploy -Papache-release )
( cd ${src_staging_dir} && mvn deploy -Dclient -Drpm -Ddeb -Papache-release )
else
( cd ${src_staging_dir} && mvn install -Papache-release )
( cd ${src_staging_dir} && mvn install -Dclient -Drpm -Ddeb -Papache-release )
fi

# Re-pack the archive with the correct names
@@ -270,14 +268,12 @@ cp ${src_staging_dir}/brooklyn-dist/deb-packaging/target/apache-brooklyn-${curre
###############################################################################
# Signatures and checksums

# OSX doesn't have sha256sum, even if MacPorts md5sha1sum package is installed.
# OSX doesn't have sha256sum, even if MacPorts package is installed.
# Easy to fake it though.
which sha256sum >/dev/null || alias sha256sum='shasum -a 256' && shopt -s expand_aliases

( cd ${artifact_dir} &&
for a in *.tar.gz *.zip *.rpm *.deb; do
md5sum -b ${a} > ${a}.md5
sha1sum -b ${a} > ${a}.sha1
sha256sum -b ${a} > ${a}.sha256
gpg2 --armor --output ${a}.asc --detach-sig ${a}
done
@@ -25,7 +25,6 @@ if [ "$#" -ne 1 ]; then
fi

command -v svn >/dev/null 2>&1 || { echo >&2 "[x] svn required but is not installed. Aborting."; exit 1; }
command -v md5sum >/dev/null 2>&1 || { echo >&2 "[x] md5sum required but is not installed. On macOS install with 'brew install md5sum'. Aborting."; exit 1; }
command -v shasum >/dev/null 2>&1 || { echo >&2 "[x] shasum required but is not installed. On macOS install with 'brew install shasum'. Aborting."; exit 1; }
command -v gpg >/dev/null 2>&1 || { echo >&2 "[x] gpg required but is not installed. On macOS install with 'brew install gpg'. Aborting."; exit 1; }
command -v rpm >/dev/null 2>&1 || { echo >&2 "[x] rpm required but is not installed. On macOS install with 'brew install rpm'. Aborting."; exit 1; }
@@ -80,13 +79,11 @@ echo "= Checking signatures and hashes of artifacts ...
echo "==============================================================================="
echo

for ARTIFACT in $(find * -type f ! \( -name '*.asc' -o -name '*.md5' -o -name '*.sha1' -o -name '*.sha256' \) ); do
md5sum -c ${ARTIFACT}.md5 && \
shasum -a1 -c ${ARTIFACT}.sha1 && \
find * -type f ! \( -name '*.asc' -o -name '*.sha256' \) -print | while read -r ARTIFACT ; do
shasum -a256 -c ${ARTIFACT}.sha256 && \
gpg --verify ${ARTIFACT}.asc ${ARTIFACT} && \
echo "[✓] Signatures verified for $ARTIFACT" \
|| { echo "[x] Invalid signature for $ARTIFACT. Aborting."; exit 1; }
echo "[✓] Signatures verified for ${ARTIFACT}" \
|| { echo "[x] Invalid signature for ${ARTIFACT}. Aborting."; exit 1; }
done

echo
@@ -96,7 +93,7 @@ echo "==========================================================================
echo

GA_RELEASE=${RELEASE%%-rc?}
for ARCHIVE in $(ls *.{tar.gz,zip,rpm}); do
find * -type f \( -name '*.tar.gz' -or -name '*.zip' -or -name '*.rpm' \) -print | while read -r ARCHIVE ; do
REL_ARCHIVE=${ARCHIVE/-rc?}
case $ARCHIVE in
*.tar.gz)

0 comments on commit 88d41e4

Please sign in to comment.