Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Builds an ONOS release |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | if [ $# -ne 3 ]; then |
| 7 | echo "Usage: onos-build-release version next-version branch" |
| 8 | echo "For example, to build rc2 on the 1.8 branch - onos-build-release onos-1.8 1.8.0-rc2 1.8.0-SNAPSHOT" |
| 9 | exit 1 |
| 10 | fi |
| 11 | |
| 12 | BRANCH=$1 |
| 13 | VERSION=$2 |
| 14 | NEXT_VERSION=$3 |
| 15 | |
| 16 | set -e |
| 17 | set -x |
| 18 | |
| 19 | # Check that environment setup is correct |
| 20 | onos-release-prerequisites |
| 21 | |
| 22 | # Block commits to Gerrit |
| 23 | ssh -p 29418 gerrit.onosproject.org projectlock lock onos ${BRANCH} |
| 24 | |
| 25 | # Prepare the build tree |
| 26 | onos-prepare-release $VERSION $BRANCH "onos-build-and-upload $VERSION $NEXT_VERSION $BRANCH" |
| 27 | |
| 28 | # Unblock commits |
| 29 | ssh -p 29418 gerrit.onosproject.org projectlock unlock onos ${BRANCH} |
| 30 | |