1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
#!/bin/bash
### Shell configuration and script bootstrap
#
set -e
set -u
set -o pipefail
. `dirname $0`/_bootstrap.sh
### Check the runtime environment
#
if [ ! -d .git ]; then
_fatalError "This script must be run from the root of the git repository"
fi
### Get the release tag
#
RELEASE_TAG=`./dev-tools/libexec/get-release-tag.sh`
if [ "$RELEASE_TAG" == "" ]; then
_fatalError "Unable to determine release tag, got: '$RELEASE_TAG'"
fi
### Check if release tag is properly formatted
#
if [[ ! "$RELEASE_TAG" =~ ^snoopy- ]]; then
_fatalError "Release tag is not properly formatted - snoopy-* format is required"
fi
RELEASE_VERSION=`echo "$RELEASE_TAG" | sed -e 's/snoopy-//'`
_echo "Determined release tag: $RELEASE_TAG"
_echo "Determined release version: $RELEASE_VERSION"
### Verify version consistency for public releases
#
RELEASE_IS_PUBLIC="false"
if _doesReleaseTagDenotePublicRelease "$RELEASE_TAG" ; then
_echo "This is a stable/rc build, running version consistency checks..."
./dev-tools/libexec/verify-last-version-everywhere.sh "$RELEASE_VERSION"
RELEASE_IS_PUBLIC="true"
else
_echo "This is NOT a stable/rc build, thus skipping version consistency checks."
fi
### Does the target release package already exist?
#
RELEASE_PACKAGE_FILE="snoopy-$RELEASE_VERSION.tar.gz"
if [ -e $RELEASE_PACKAGE_FILE ]; then
_fatalError "Release package file already exists: $RELEASE_PACKAGE_FILE"
fi
### Clean up the git repo first
#
./dev-tools/clean-git-repository.sh
### Create the release package
#
./bootstrap.sh
./configure --enable-everything
make clean
make distcheck
### Report success
#
_echo ""
_echo "SUCCESS: Build complete."
_echo "SUCCESS: Result: $RELEASE_PACKAGE_FILE"
_echo ""
### Suggest next step(s)
#
if [ "$RELEASE_IS_PUBLIC" == "true" ]; then
_echo "
Next step:
==========
5. Publish the release:
./dev-tools/publish-release.sh
"
else
_echo "
Next step:
==========
This is not a public release, thus not showing the publishing next step(s).
"
fi
|