blob: c7044c7438cf6fa15b21bc357a0ab40f4e77aec0 [file] [log] [blame]
Ray Milkey8db3c102017-11-02 13:08:20 -07001#!/bin/bash -ex
Ray Milkey3ac00792016-12-01 14:28:15 -08002# -----------------------------------------------------------------------------
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
Ray Milkey3ac00792016-12-01 14:28:15 -080016# fix version strings, build artifacts, upload artifacts
Ray Milkey8db3c102017-11-02 13:08:20 -070017onos-release $VERSION $DRY_RUN
Ray Milkey3ac00792016-12-01 14:28:15 -080018
Ray Milkey13d3ae32017-01-03 15:00:04 -080019if [ $dryRun -eq 0 ]; then
20 # upload docs
21 onos-upload-docs ${WIKI_USER}
Ray Milkey3ac00792016-12-01 14:28:15 -080022
Ray Milkey13d3ae32017-01-03 15:00:04 -080023 # spot check that uploaded artifacts are correct
24 check-uploaded-maven-artifacts $VERSION $ONOS_ROOT https://oss.sonatype.org/content/groups/staging
Ray Milkey3ac00792016-12-01 14:28:15 -080025
Ray Milkey13d3ae32017-01-03 15:00:04 -080026 # set the version strings to the next version
27 onos-snapshot ${NEXT_VERSION}
Ray Milkey3ac00792016-12-01 14:28:15 -080028
Ray Milkey13d3ae32017-01-03 15:00:04 -080029 # Push version string changes to git
30 git push origin ${BRANCH}
Ray Milkey3ac00792016-12-01 14:28:15 -080031
Ray Milkey13d3ae32017-01-03 15:00:04 -080032 # Push tag for this build to git
Ray Milkey78ce4002018-08-10 11:16:44 -070033 #git push origin ${VERSION}
Ray Milkey13d3ae32017-01-03 15:00:04 -080034fi