Ray Milkey | 8db3c10 | 2017-11-02 13:08:20 -0700 | [diff] [blame^] | 1 | #!/bin/bash -ex |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 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 | |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 16 | # fix version strings, build artifacts, upload artifacts |
Ray Milkey | 8db3c10 | 2017-11-02 13:08:20 -0700 | [diff] [blame^] | 17 | onos-release $VERSION $DRY_RUN |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 18 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 19 | if [ $dryRun -eq 0 ]; then |
| 20 | # upload docs |
| 21 | onos-upload-docs ${WIKI_USER} |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 22 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 23 | # upload release bits |
| 24 | onos-upload-bits |
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 | # spot check that uploaded artifacts are correct |
| 27 | 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] | 28 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 29 | # set the version strings to the next version |
| 30 | onos-snapshot ${NEXT_VERSION} |
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 | # Push version string changes to git |
| 33 | git push origin ${BRANCH} |
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 tag for this build to git |
| 36 | git push origin ${VERSION} |
| 37 | fi |