blob: 1546fb26a353bc5cfd99ba192745b9af0985cb3a [file] [log] [blame]
Thomas Vachuska683b31b2015-01-26 11:54:31 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Drives the ONOS release process.
4# -----------------------------------------------------------------------------
5
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7. $ONOS_ROOT/tools/build/envDefaults
8
9export NEW_VERSION=$1
10[ -z "$NEW_VERSION" ] && echo "New ONOS version not specified" && exit 1
11
12export NEW_VERSION_SHORT=${NEW_VERSION%-SNAPSHOT}
13[ "$NEW_VERSION" != "$NEW_VERSION_SHORT" ] && echo "Version is a SNAPSHOT" && exit 1;
14
15cd $ONOS_ROOT
16
17# TODO: Create a new branch for this activity?
18
19# Change the version
20onos-change-version $NEW_VERSION
Brian O'Connor6b30e1b2015-03-11 16:44:16 -070021export ONOS_VERSION=$NEW_VERSION
Thomas Vachuska683b31b2015-01-26 11:54:31 -080022
23# Build ONOS & deploy to staging repo using the release profile.
24onos-build && onos-package && mvn -Prelease clean deploy -DskipTests
25
26# Build ONOS docs
27onos-build-docs
28
29# Build ONOS archetypes & deploy to staging repo using the release profile.
30# Note that release of the staging repository is a separate manual step.
31cd tools/package/archetype
Brian O'Connord4cd0bf2015-02-28 23:13:48 -080032mvn clean install && onos-archetypes-test && mvn -Prelease clean deploy
Thomas Vachuska683b31b2015-01-26 11:54:31 -080033
34# Commit newly versioned artifacts and issue a tag.
35git commit -a -m"Tagging $NEW_VERSION"
36git tag -sm"Tagging $NEW_VERSION" $NEW_VERSION #signed tag
37
38# TODO: push?