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 | 863677e | 2017-08-28 11:10:37 -0700 | [diff] [blame^] | 20 | onos-release $VERSION $DRY_RUN |
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 |
Ray Milkey | dd80a4a | 2017-08-25 19:25:16 -0700 | [diff] [blame] | 30 | # RAM - these have suddenly disappeared - need to investigate further |
| 31 | #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] | 32 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 33 | # set the version strings to the next version |
| 34 | onos-snapshot ${NEXT_VERSION} |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 35 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 36 | # Push version string changes to git |
| 37 | git push origin ${BRANCH} |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 38 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 39 | # Push tag for this build to git |
| 40 | git push origin ${VERSION} |
| 41 | fi |