Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/xsl/upVersionParents.sh38
-rwxr-xr-xscripts/xsl/xslUpVersion.sh26
2 files changed, 64 insertions, 0 deletions
diff --git a/scripts/xsl/upVersionParents.sh b/scripts/xsl/upVersionParents.sh
new file mode 100755
index 00000000..47e8b1fb
--- /dev/null
+++ b/scripts/xsl/upVersionParents.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+
+
+LOG=$(pwd)/log_$( date +%Y%m%d%H%M%S ).txt
+
+exec >>$LOG 2>&1
+
+LREPO=$(pwd)/../localMavenRepo
+export JAVA_HOME=/opt/local/jdk1.7.0_11
+TMP_DIR=$(pwd)/../tmp
+mkdir -p $TMP_DIR
+export MAVEN_OPTS="-Xmx2048m -XX:MaxPermSize=256M -Djava.io.tmpdir=${TMP_DIR}"
+export MAVEN_PATH=/opt/local/apache-maven-3.0.4/bin
+export PATH=$JAVA_HOME/bin:$MAVEN_PATH:$PATH
+
+DIR=$( dirname $0 )
+NEW_VER=4.4.0-SNAPSHOT
+if [ $# -eq 1 ]; then
+ NEW_VER="$1"
+fi
+
+find * -name pom.xml -print0 | xargs -0 grep packaging.pom..packaging | cut -f1 -d: | sort -u >/tmp/t1_$$.txt
+find * -name pom.xml -print0 | xargs -0 grep packaging.eclipse-repository..packaging | cut -f1 -d: | sort -u >>/tmp/t1_$$.txt
+
+for POM in $( cat /tmp/t1_$$.txt ); do
+ # this doesn't update everything like I hoped
+ # and fails for a small number of bundles.
+ # it doesn't deal well with the children of the parent poms
+ mvn -Pbuild-individual-bundles \
+ versions:set \
+ -DnewVersion=$NEW_VER \
+ -DgenerateBackupPoms=false \
+ -f $POM \
+ -Dmaven.repo.local=$LREPO
+done
+
+
diff --git a/scripts/xsl/xslUpVersion.sh b/scripts/xsl/xslUpVersion.sh
new file mode 100755
index 00000000..38dee904
--- /dev/null
+++ b/scripts/xsl/xslUpVersion.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+
+DIR=$( dirname $0 )
+NEW_VER=4.4.0-SNAPSHOT
+if [ $# -eq 1 ]; then
+ NEW_VER="$1"
+fi
+
+find * -name pom.xml -print0 >/tmp/files.txt
+
+cat /tmp/files.txt | xargs -0 grep packaging.pom..packaging | cut -f1 -d: | sort -u >/tmp/t1_$$.txt
+cat /tmp/files.txt | xargs -0 grep packaging.eclipse-repository..packaging | cut -f1 -d: | sort -u >>/tmp/t1_$$.txt
+
+for POM in $( cat /tmp/t1_$$.txt ); do
+xsltproc --stringparam new-version "$NEW_VER" -o "${POM}.out" $DIR/fix-pom-version.xsl "${POM}"
+mv "${POM}.out" "${POM}"
+done
+
+find * -name pom.xml | sort -u >/tmp/t1_$$.txt
+
+for POM in $( cat /tmp/t1_$$.txt ); do
+xsltproc --stringparam new-version "$NEW_VER" -o "${POM}.out" $DIR/fix-pom-parent-version.xsl "${POM}"
+mv "${POM}.out" "${POM}"
+done
+

Back to the top