Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Builds the release bits and uploads them. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | VERSION=$1 |
| 7 | NEXT_VERSION=$2 |
| 8 | BRANCH=$3 |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 9 | DRY_RUN=$4 |
| 10 | |
| 11 | dryRun=0 |
| 12 | if [ "${DRY_RUN}" == "--dry-run" ]; then |
| 13 | dryRun=1 |
| 14 | fi |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 15 | |
| 16 | set -e |
| 17 | set -x |
| 18 | |
| 19 | # fix version strings, build artifacts, upload artifacts |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 20 | onos-release $VERSION $DRY_RUN | tee build.log |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 21 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 22 | if [ $dryRun -eq 0 ]; then |
| 23 | # upload docs |
| 24 | onos-upload-docs ${WIKI_USER} |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 25 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 26 | # upload release bits |
| 27 | onos-upload-bits |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 28 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 29 | # spot check that uploaded artifacts are correct |
| 30 | check-uploaded-maven-artifacts $VERSION $ONOS_ROOT https://oss.sonatype.org/content/groups/staging |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 31 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 32 | # set the version strings to the next version |
| 33 | onos-snapshot ${NEXT_VERSION} |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 34 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 35 | # Push version string changes to git |
| 36 | git push origin ${BRANCH} |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 37 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 38 | # Push tag for this build to git |
| 39 | git push origin ${VERSION} |
| 40 | fi |