Thomas Vachuska
Committed by Gerrit Code Review

Extending the versioning to cover BUCK artifacts.

Adding ability to version extraneous stuff.

Change-Id: I2e18dafd6d8705504ab01000d6707037415dfd0c
(cherry picked from commit 251016df)
......@@ -20,8 +20,7 @@
<feature>onos-api</feature>
<bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
<bundle>mvn:org.onosproject/openflowj/0.9.3.onos-SNAPSHOT</bundle>
<bundle>mvn:org.onosproject/openflowj/0.9.4.onos</bundle>
<bundle>mvn:${project.groupId}/onos-of-api/${project.version}</bundle>
</feature>
</features>
......
......@@ -18,7 +18,7 @@
<feature name="${project.artifactId}" version="${project.version}"
description="${project.description}">
<feature>onos-api</feature>
<bundle>mvn:org.onosproject/openflowj/0.9.3.onos-SNAPSHOT</bundle>
<bundle>mvn:org.onosproject/openflowj/0.9.4.onos</bundle>
<bundle>mvn:${project.groupId}/onos-of-api/${project.version}</bundle>
<bundle>mvn:${project.groupId}/onos-of-ctl/${project.version}</bundle>
......
......@@ -17,6 +17,8 @@ cd $ONOS_ROOT
# Augment the version of the main pom and the modules nested underneath.
mvn versions:set -DnewVersion=$NEW_VERSION versions:commit
mvn -f lib/pom.xml versions:set -DnewVersion=$NEW_VERSION versions:commit
sed -i "" -E "1,/<version>/s/<version>[^<]*</<version>$NEW_VERSION</g" pom.xml
# Augment the version of the Java API pom files and the overview.html file.
for pom in docs/internal.xml docs/external.xml; do
......@@ -46,3 +48,10 @@ sed -i "" -E "s/-DarchetypeVersion=[^\"]*/-DarchetypeVersion=$NEW_VERSION/g" $ON
perl -i -0pe "s#<artifactId>cord-gui<.*\n.*version>#<artifactId>cord-gui</artifactId>\n <version>$NEW_VERSION</version>#" $ONOS_ROOT/apps/demo/cord-gui/pom.xml
sed -i "" -E "s#demo/cord-gui/target/cord-gui-.*\.war#demo/cord-gui/target/cord-gui-$NEW_VERSION.war#" $ONOS_ROOT/apps/demo/cord-gui/src/scripts/pullwar.sh
sed -i "" -E "s#CORD=./cord-gui-.*\.war#CORD=./cord-gui-$NEW_VERSION.war#" $ONOS_ROOT/apps/demo/cord-gui/src/scripts/run.me
# Version the BUCK artifacts
sed -i "" -E "s#/org/onosproject/onos-features/.*/#/org/onosproject/onos-features/$NEW_VERSION/#" $ONOS_ROOT/buck-tools/onos_stage.py
sed -i "" -E "s#onos-features-.*-features.xml#onos-features-$NEW_VERSION-features.xml#" $ONOS_ROOT/buck-tools/onos_stage.py
sed -i "" -E "s#ONOS_VERSION = .*#ONOS_VERSION = '$NEW_VERSION'#" $ONOS_ROOT/bucklets/onos.bucklet
sed -i "" -E "s#ONOS_VERSION = .*#ONOS_VERSION = '$NEW_VERSION'#" $ONOS_ROOT/bucklets/onos_app.bucklet
......
......@@ -9,8 +9,11 @@ aux=$(mktemp)
trap "rm -f $aux 2>/dev/null" EXIT
cd $ONOS_ROOT
grep -r SNAPSHOT . | \
egrep -v -f $ONOS_ROOT/tools/build/onos-validate-change-version.excludes >$aux
find . -type f | \
egrep -v -f $ONOS_ROOT/tools/build/onos-validate-change-version.excludes | \
xargs grep SNAPSHOT >$aux
# FIXME: deal properly with files with white-space in them
if [ -s $aux ]; then
echo "There are files containing SNAPSHOT references:"
......
\./build.log
\./.git
\./target/
/target/
\.iml$
\./buck-out/
\./lib/BUCK
\./lib/deps.json
\./bucklets/maven_jar\.bucklet
\./tools/build/libgen
\./utils/osgiwrap/
\./tools/build/onos-validate-change-version
\./tools/build/onos-change-version
\./tools/build/onos-release
......@@ -19,3 +26,6 @@
\./protocols/ospf/
\./protocols/snmp/
\./providers/snmp/
\./providers/bmv2/
\./drivers/bmv2/
\./apps/kafka-integration/
\ No newline at end of file
......