summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2020-03-06 16:40:25 -0500
committerSingal, Kapil (ks220y) <ks220y@att.com>2020-03-06 16:41:04 -0500
commit96babb945f19f1ead04da61f0d627be3e028defc (patch)
tree51802b54ecff39d1838c491e530cbbc4ce183d68
parent8c76c9880d88085d28fc33da582ff63d93d1e467 (diff)
Fixing updateParentVersion.sh
1) Add command to keep empty line between header and project tag in pom.xml 2) Adding param to keep CDATA value as is. Issue-ID: CCSDK-2164 Change-Id: Ic4babea86eb6d3f50d3674b7c8c829171cc13465 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
-rwxr-xr-xtools/updParentVersion.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/updParentVersion.sh b/tools/updParentVersion.sh
index 8740a89c..28e5bdb7 100755
--- a/tools/updParentVersion.sh
+++ b/tools/updParentVersion.sh
@@ -16,7 +16,7 @@ cat <<END > /tmp/rebase-pom.xslt
xmlns:pom="http://maven.apache.org/POM/4.0.0"
xmlns="http://maven.apache.org/POM/4.0.0"
exclude-result-prefixes="pom">
- <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
+ <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="no" cdata-section-elements="sdnc.keypass"/>
<!-- Copy everything that does not match a rewrite rule -->
<xsl:template match="@*|node()">
@@ -39,3 +39,6 @@ then
fi
find $1 -name pom.xml -exec bash -c 'updatePom "$0" $1' '{}' \;
+
+#Adding single empty line before project tag if there is a header available
+find $1 -name pom.xml -exec sed -i -n '$!N;s@-->\n<project@-->\n\n<project@;P;D' {} \;