You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/03/20 15:00:32 UTC

[sling-tooling-scm] 23/35: SLING-7162 - Update SCM information in all POM files to reference Git

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-scm.git

commit fdbe6923ff3b314adb984d821410e3c60f8867ae
Author: Robert Munteanu <ro...@gmail.com>
AuthorDate: Thu Oct 19 01:46:39 2017 +0200

    SLING-7162 - Update SCM information in all POM files to reference Git
    
    Add script to update the SCM info.
---
 scripts/update-scm-info.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/scripts/update-scm-info.sh b/scripts/update-scm-info.sh
new file mode 100755
index 0000000..1c13717
--- /dev/null
+++ b/scripts/update-scm-info.sh
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+if [ $# -ne 1 ]; then
+    echo "Usage: $0 module-directory"
+    exit 1
+fi
+
+cd $1
+if [ ! -f pom.xml ]; then
+    exit 0;
+fi
+
+remote_url=$(git remote get-url origin)
+module_name=$(basename ${remote_url})
+
+scm_base="https://gitbox.apache.org/repos/asf/${module_name}"
+
+sed -i "s#<connection>scm.*</connection>#<connection>scm:git:${scm_base}</conncetion>#" pom.xml
+sed -i "s#<developerConnection>scm.*</developerConnection>#<developerConnection>scm:git:${scm_base}</developerConnection>#" pom.xml
+sed -i "s#<url>.*svn.apache.org.*</url>#<url>https://gitbox.apache.org/repos/asf?p=${module_name}.git</url>#" pom.xml
+
+git add pom.xml
+git commit -m 'SLING-7162 - Update SCM information in all POM files to reference Git'
+