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 | |
Ray Milkey | f77ea41 | 2018-08-10 17:37:28 -0700 | [diff] [blame] | 6 | set -e -o pipefail |
| 7 | |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 8 | VERSION=$1 |
| 9 | NEXT_VERSION=$2 |
| 10 | BRANCH=$3 |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 11 | DRY_RUN=$4 |
| 12 | |
| 13 | dryRun=0 |
| 14 | if [ "${DRY_RUN}" == "--dry-run" ]; then |
| 15 | dryRun=1 |
| 16 | fi |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 17 | |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 18 | # fix version strings, build artifacts, upload artifacts |
Ray Milkey | 8db3c10 | 2017-11-02 13:08:20 -0700 | [diff] [blame] | 19 | onos-release $VERSION $DRY_RUN |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 20 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 21 | if [ $dryRun -eq 0 ]; then |
pierventre | 80b532d | 2022-07-29 21:57:16 +0200 | [diff] [blame] | 22 | # prepare docs |
| 23 | onos-prepare-docs |
Ray Milkey | 3ac0079 | 2016-12-01 14:28:15 -0800 | [diff] [blame] | 24 | |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 25 | # spot check that uploaded artifacts are correct |
Ray Milkey | f77ea41 | 2018-08-10 17:37:28 -0700 | [diff] [blame] | 26 | # TODO - implement this for bazel |
| 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 |
Ray Milkey | 4867af2 | 2018-08-10 16:52:28 -0700 | [diff] [blame] | 36 | git push origin ${VERSION} |
Ray Milkey | 13d3ae3 | 2017-01-03 15:00:04 -0800 | [diff] [blame] | 37 | fi |