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 2017/09/28 19:12:04 UTC
svn commit: r1810033 - /sling/trunk/tooling/scm/scripts/migrate-to-git.sh
Author: rombert
Date: Thu Sep 28 19:12:03 2017
New Revision: 1810033
URL: http://svn.apache.org/viewvc?rev=1810033&view=rev
Log:
SLING-3987 - move from Subversion to Git
Wire github repository creation for the dry run.
Modified:
sling/trunk/tooling/scm/scripts/migrate-to-git.sh
Modified: sling/trunk/tooling/scm/scripts/migrate-to-git.sh
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/scm/scripts/migrate-to-git.sh?rev=1810033&r1=1810032&r2=1810033&view=diff
==============================================================================
--- sling/trunk/tooling/scm/scripts/migrate-to-git.sh (original)
+++ sling/trunk/tooling/scm/scripts/migrate-to-git.sh Thu Sep 28 19:12:03 2017
@@ -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