From 3e21135e58aec717501289eba03cb7feabcb5709 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Thu, 28 Mar 2019 21:57:11 +0100 Subject: [releng] Add dependency from source to binary feature Adapt the version.sh script to also replace this version number. The script now handles all feature.xml files the same way. Bug: 545906 Change-Id: I8a7f422f2c2ab0034a3921281b8cddb2412fa08d Signed-off-by: Thomas Wolf --- tools/version.sh | 44 +++++++------------------------------------- 1 file changed, 7 insertions(+), 37 deletions(-) (limited to 'tools/version.sh') diff --git a/tools/version.sh b/tools/version.sh index 6b52d00837..8b65b0c6a0 100755 --- a/tools/version.sh +++ b/tools/version.sh @@ -112,42 +112,9 @@ perl -pi~ -e ' s/(org.eclipse.jgit;bundle-version="\[)[^"]*(\)")/${1}'"$JGIT_V,$JGIT_N"'${2}/; ' $(git ls-files | grep META-INF/MANIFEST.MF) -perl -pi~ -e ' - if ($ARGV ne $old_argv) { - $seen_version = 0; - $old_argv = $ARGV; - } - if (!$seen_version) { - $seen_version = 1 if (!/<\?xml/ && - s/(version=")[^"]*(")/${1}'"$OSGI_V"'${2}/); - } - s/(feature="org.eclipse.jgit.ssh.apache" version=")[^"]*(")/${1}'"$JGIT_V"'${2}/; - ' org.eclipse.egit-feature/feature.xml - -perl -pi~ -e ' - if ($ARGV ne $old_argv) { - $seen_version = 0; - $old_argv = $ARGV; - } - if (!$seen_version) { - $seen_version = 1 if (!/<\?xml/ && - s/(version=")[^"]*(")/${1}'"$OSGI_V"'${2}/); - } - s/(feature="org.eclipse.egit" version=")[^"]*(")/${1}'"$EGIT_V"'${2}/; - ' org.eclipse.egit.mylyn-feature/feature.xml - -perl -pi~ -e ' - if ($ARGV ne $old_argv) { - $seen_version = 0; - $old_argv = $ARGV; - } - if (!$seen_version) { - $seen_version = 1 if (!/<\?xml/ && - s/(version=")[^"]*(")/${1}'"$OSGI_V"'${2}/); - } - s/(plugin="org.eclipse.egit.core" version=")[^"]*(")/${1}'"$EGIT_V"'${2}/; - s/(plugin="org.eclipse.egit.ui" version=")[^"]*(")/${1}'"$EGIT_V"'${2}/; - ' org.eclipse.egit.gitflow-feature/feature.xml +# Replace version numbers in feature.xml files. The first version is replaced by the full OSGi version. +# Versions in dependencies in the section for EGit/JGit features or plugins are set to the +# simple version numbers. perl -pi~ -e ' if ($ARGV ne $old_argv) { @@ -158,7 +125,10 @@ perl -pi~ -e ' $seen_version = 1 if (!/<\?xml/ && s/(version=")[^"]*(")/${1}'"$OSGI_V"'${2}/); } - s/(feature="org.eclipse.jgit" version=")[^"]*(")/${1}'"$JGIT_V"'${2}/; + s/(feature="org.eclipse.jgit[^"]*" version=")[^"]*(")/${1}'"$JGIT_V"'${2}/; + s/(plugin="org.eclipse.jgit[^"]*" version=")[^"]*(")/${1}'"$JGIT_V"'${2}/; + s/(feature="org.eclipse.egit[^"]*" version=")[^"]*(")/${1}'"$EGIT_V"'${2}/; + s/(plugin="org.eclipse.egit[^"]*" version=")[^"]*(")/${1}'"$EGIT_V"'${2}/; ' $(git ls-files | grep feature.xml) perl -pi~ -e ' -- cgit v1.2.3