summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2013-06-04 13:58:24 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2013-06-04 22:28:01 +0200
commit79a2e28a937f399c2ee83b34db25f86095ded06a (patch)
treee2c53c094e79272d1a96c07ad57180bf06acdaef /tools
parentbf388c2e32d2e6c1117573383f01632e1da84bf5 (diff)
downloadjgit-79a2e28a937f399c2ee83b34db25f86095ded06a.tar.gz
jgit-79a2e28a937f399c2ee83b34db25f86095ded06a.zip
Fix version.sh to not overwrite ${project.version}
Change-Id: If5ae792581170bcba2dc1860012cbe389d8e9f24 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/version.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/version.sh b/tools/version.sh
index eaff9a61d8..52a02c59f7 100755
--- a/tools/version.sh
+++ b/tools/version.sh
@@ -133,7 +133,14 @@ perl -pi~ -e '
' org.eclipse.jgit.packaging/org.*.feature/feature.xml
perl -pi~ -e '
- s{<(version)>.*</\1>}{<${1}>'"$POM_V"'</${1}>};
+ if ($ARGV ne $old_argv) {
+ $seen_version = 0;
+ $old_argv = $ARGV;
+ }
+ if (!$seen_version) {
+ $seen_version = 1 if
+ s{<(version)>.*</\1>}{<${1}>'"$POM_V"'</${1}>};
+ }
' org.eclipse.jgit.packaging/org.*.feature/pom.xml
perl -pi~ -e '
@@ -152,8 +159,8 @@ perl -pi~ -e '
$seen_version = 0;
$old_argv = $ARGV;
}
- if ($seen_version < 2) {
- $seen_version++ if
+ if (!$seen_version) {
+ $seen_version = 1 if
s{<(version)>.*</\1>}{<${1}>'"$POM_V"'</${1}>};
}
' org.eclipse.jgit.packaging/pom.xml