blob: 10da019925cc53d9468c9674d361afec81fbb2f2 [file] [log] [blame]
Thomas Vachuska683b31b2015-01-26 11:54:31 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Drives the ONOS snapshot 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 not 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
21
22# Commit newly versioned artifacts.
23git commit -a -m"Starting snapshot $NEW_VERSION"
24
25# TODO: push?