blob: d308d99e7348becde60618f30cc263c308572508 [file] [log] [blame]
Ray Milkey3ac00792016-12-01 14:28:15 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Builds the release bits and uploads them.
4# -----------------------------------------------------------------------------
5
6VERSION=$1
7NEXT_VERSION=$2
8BRANCH=$3
Ray Milkey13d3ae32017-01-03 15:00:04 -08009DRY_RUN=$4
10
11dryRun=0
12if [ "${DRY_RUN}" == "--dry-run" ]; then
13 dryRun=1
14fi
Ray Milkey3ac00792016-12-01 14:28:15 -080015
16set -e
17set -x
18
19# fix version strings, build artifacts, upload artifacts
Ray Milkey863677e2017-08-28 11:10:37 -070020onos-release $VERSION $DRY_RUN
Ray Milkey3ac00792016-12-01 14:28:15 -080021
Ray Milkey13d3ae32017-01-03 15:00:04 -080022if [ $dryRun -eq 0 ]; then
23 # upload docs
24 onos-upload-docs ${WIKI_USER}
Ray Milkey3ac00792016-12-01 14:28:15 -080025
Ray Milkey13d3ae32017-01-03 15:00:04 -080026 # upload release bits
27 onos-upload-bits
Ray Milkey3ac00792016-12-01 14:28:15 -080028
Ray Milkey13d3ae32017-01-03 15:00:04 -080029 # spot check that uploaded artifacts are correct
Ray Milkeydd80a4a2017-08-25 19:25:16 -070030 # 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 Milkey3ac00792016-12-01 14:28:15 -080032
Ray Milkey13d3ae32017-01-03 15:00:04 -080033 # set the version strings to the next version
34 onos-snapshot ${NEXT_VERSION}
Ray Milkey3ac00792016-12-01 14:28:15 -080035
Ray Milkey13d3ae32017-01-03 15:00:04 -080036 # Push version string changes to git
37 git push origin ${BRANCH}
Ray Milkey3ac00792016-12-01 14:28:15 -080038
Ray Milkey13d3ae32017-01-03 15:00:04 -080039 # Push tag for this build to git
40 git push origin ${VERSION}
41fi