blob: fdf3f9294ccadab82e49ecdaae68e94cfad61865 [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
Ray Milkeyf77ea412018-08-10 17:37:28 -07006set -e -o pipefail
7
Ray Milkey3ac00792016-12-01 14:28:15 -08008VERSION=$1
9NEXT_VERSION=$2
10BRANCH=$3
Ray Milkey13d3ae32017-01-03 15:00:04 -080011DRY_RUN=$4
12
13dryRun=0
14if [ "${DRY_RUN}" == "--dry-run" ]; then
15 dryRun=1
16fi
Ray Milkey3ac00792016-12-01 14:28:15 -080017
Ray Milkey3ac00792016-12-01 14:28:15 -080018# fix version strings, build artifacts, upload artifacts
Ray Milkey8db3c102017-11-02 13:08:20 -070019onos-release $VERSION $DRY_RUN
Ray Milkey3ac00792016-12-01 14:28:15 -080020
Ray Milkey13d3ae32017-01-03 15:00:04 -080021if [ $dryRun -eq 0 ]; then
pierventredd14a4e2022-07-29 21:57:16 +020022 # prepare docs
23 onos-prepare-docs
Ray Milkey3ac00792016-12-01 14:28:15 -080024
Ray Milkey13d3ae32017-01-03 15:00:04 -080025 # spot check that uploaded artifacts are correct
Ray Milkeyf77ea412018-08-10 17:37:28 -070026 # TODO - implement this for bazel
27 # check-uploaded-maven-artifacts $VERSION $ONOS_ROOT https://oss.sonatype.org/content/groups/staging
Ray Milkey3ac00792016-12-01 14:28:15 -080028
Ray Milkey13d3ae32017-01-03 15:00:04 -080029 # set the version strings to the next version
30 onos-snapshot ${NEXT_VERSION}
Ray Milkey3ac00792016-12-01 14:28:15 -080031
Ray Milkey13d3ae32017-01-03 15:00:04 -080032 # Push version string changes to git
33 git push origin ${BRANCH}
Ray Milkey3ac00792016-12-01 14:28:15 -080034
Ray Milkey13d3ae32017-01-03 15:00:04 -080035 # Push tag for this build to git
Ray Milkey4867af22018-08-10 16:52:28 -070036 git push origin ${VERSION}
Ray Milkey13d3ae32017-01-03 15:00:04 -080037fi