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:22 UTC
[sling-tooling-scm] 13/35: SLING-3987 - move from Subversion to 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 9d0062079bf6e0f1f134704fc9d3159bdababeeb
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Sep 28 19:12:03 2017 +0000
SLING-3987 - move from Subversion to Git
Wire github repository creation for the dry run.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810033 13f79535-47bb-0310-9956-ffa450edef68
---
scripts/migrate-to-git.sh | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/scripts/migrate-to-git.sh b/scripts/migrate-to-git.sh
index da23e35..b943a5b 100755
--- a/scripts/migrate-to-git.sh
+++ b/scripts/migrate-to-git.sh
@@ -130,22 +130,29 @@ while read -r module; do
fi
elif [ $1 == "-r" ]; then
- status=$(curl -s -o /dev/null -I -w "%{http_code}" https://git-wip-us.apache.org/repos/asf?p=${repo_name})
+ # TODO - switch to ASF for the final run
+ status=$(curl -s -o /dev/null -I -w "%{http_code}" https://github.com/not-sling/${repo_name})
if [ $status = "404" ]; then
echo "Repository not found, will create";
elif [ $status = "200" ] ;then
echo "Repository exists, skipping";
+ continue
else
echo "Unhandled HTTP status code ${status}, aborting"
exit 1
fi
+
+ if [ -z "$GITHUB_AUTH" ]; then
+ echo "Please export GITHUB_AUTH='your-github-username your-github-token'"
+ exit 2
+ fi
+
+ echo "Creating GIT repository ..."
-
# TODO - create the repository using the ASF self-service tool
- # curl --netrc 'https://reporeq.apache.org/ss.lua'
- echo "Creating GIT repository ..."
- exit 254 # unimplemented
+ ./tooling/scm/scripts/create-gh-repo.sh ${GITHUB_AUTH} ${repo_name}
+
else # -p
pushd ${git_repo_location}/${repo_name}
git remote add origin https://git-wip-us.apache.org/repos/asf/${repo_name}.git