summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2020-03-06 16:40:25 -0500
committerKAPIL SINGAL <ks220y@att.com>2020-03-06 21:42:10 +0000
commitd82faafca65c9b4b9cf0d713873d5ca9cce704a3 (patch)
tree851235ef75a11f048e3321e89d5c995cd636cc97
parentd06b615678e891f65fda23d52dbff19b3b1ca45e (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' {} \;