Extending the versioning to cover BUCK artifacts.
Adding ability to version extraneous stuff.
Change-Id: I2e18dafd6d8705504ab01000d6707037415dfd0c
diff --git a/drivers/default/features.xml b/drivers/default/features.xml
index 659d36c..e2e55ee 100644
--- a/drivers/default/features.xml
+++ b/drivers/default/features.xml
@@ -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>
diff --git a/providers/openflow/base/features.xml b/providers/openflow/base/features.xml
index b97153a..515f4a8 100644
--- a/providers/openflow/base/features.xml
+++ b/providers/openflow/base/features.xml
@@ -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>
diff --git a/tools/build/onos-change-version b/tools/build/onos-change-version
index afe898e..c4706ce 100755
--- a/tools/build/onos-change-version
+++ b/tools/build/onos-change-version
@@ -17,6 +17,8 @@
# 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
@@ -51,3 +53,10 @@
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
diff --git a/tools/build/onos-validate-change-version b/tools/build/onos-validate-change-version
index d8f917f..826b693 100755
--- a/tools/build/onos-validate-change-version
+++ b/tools/build/onos-validate-change-version
@@ -9,8 +9,11 @@
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:"
diff --git a/tools/build/onos-validate-change-version.excludes b/tools/build/onos-validate-change-version.excludes
index 32fb1e8..de38b8a 100755
--- a/tools/build/onos-validate-change-version.excludes
+++ b/tools/build/onos-validate-change-version.excludes
@@ -1,6 +1,13 @@
\./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
@@ -18,4 +25,7 @@
\./apps/vrouter/pom.xml
\./protocols/ospf/
\./protocols/snmp/
-\./providers/snmp/
\ No newline at end of file
+\./providers/snmp/
+\./providers/bmv2/
+\./drivers/bmv2/
+\./apps/kafka-integration/
\ No newline at end of file