Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame] | 1 | #!/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 | |
| 9 | export NEW_VERSION=$1 |
| 10 | [ -z "$NEW_VERSION" ] && echo "New ONOS version not specified" && exit 1 |
| 11 | |
| 12 | export NEW_VERSION_SHORT=${NEW_VERSION%-SNAPSHOT} |
| 13 | [ "$NEW_VERSION" != "$NEW_VERSION_SHORT" ] && echo "Version is a SNAPSHOT" && exit 1; |
| 14 | |
| 15 | cd $ONOS_ROOT |
| 16 | |
| 17 | # TODO: Create a new branch for this activity? |
| 18 | |
| 19 | # Change the version |
| 20 | onos-change-version $NEW_VERSION |
Brian O'Connor | 6b30e1b | 2015-03-11 16:44:16 -0700 | [diff] [blame] | 21 | export ONOS_VERSION=$NEW_VERSION |
Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame] | 22 | |
Brian O'Connor | d783f2f | 2015-03-17 19:11:40 -0700 | [diff] [blame] | 23 | # Build the maven-plugin |
| 24 | pushd tools/package/maven-plugin |
| 25 | mvn clean install && mvn -Prelease clean deploy |
| 26 | popd |
| 27 | |
Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame] | 28 | # Build ONOS & deploy to staging repo using the release profile. |
| 29 | onos-build && onos-package && mvn -Prelease clean deploy -DskipTests |
| 30 | |
| 31 | # Build ONOS docs |
| 32 | onos-build-docs |
| 33 | |
| 34 | # Build ONOS archetypes & deploy to staging repo using the release profile. |
| 35 | # Note that release of the staging repository is a separate manual step. |
Brian O'Connor | d783f2f | 2015-03-17 19:11:40 -0700 | [diff] [blame] | 36 | pushd tools/package/archetypes/ |
Brian O'Connor | d4cd0bf | 2015-02-28 23:13:48 -0800 | [diff] [blame] | 37 | mvn clean install && onos-archetypes-test && mvn -Prelease clean deploy |
Brian O'Connor | d783f2f | 2015-03-17 19:11:40 -0700 | [diff] [blame] | 38 | popd |
Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame] | 39 | |
| 40 | # Commit newly versioned artifacts and issue a tag. |
| 41 | git commit -a -m"Tagging $NEW_VERSION" |
| 42 | git tag -sm"Tagging $NEW_VERSION" $NEW_VERSION #signed tag |
| 43 | |
| 44 | # TODO: push? |