more debug statements
This commit is contained in:
parent
de4a821af5
commit
c9e3f1782c
@ -162,7 +162,7 @@ if [[ "$SOURCEORG" == "smecontribs" ]]; then
|
||||
fi
|
||||
|
||||
# migrate the source package over to target with updated fields
|
||||
if [ $DEBUG ] ; then echo "Migrating $SOURCEORG/$SOURCEPKG as $TARGETORG/$1 on $TARGETHOST" ; fi
|
||||
if [ $DEBUG ] ; then echo "Migrating $SOURCEORG/$SOURCEPKG as $TARGETORG/$TRAGETPKG on $GITEAHOST" ; fi
|
||||
RESPONSE=$(curl $SILENT $checkSSL -X 'POST' \
|
||||
"$GITEAHOST/api/v1/repos/migrate" \
|
||||
-H 'accept: application/json' \
|
||||
@ -179,6 +179,7 @@ RESPONSE=$(curl $SILENT $checkSSL -X 'POST' \
|
||||
|
||||
# Migrate does NOT copy accross the issues and wiki external links
|
||||
# grab WIKILINK from source package
|
||||
if [ $DEBUG ] ; then echo "Retrieving WIKIKLINK from $SOURCEORG/$SOURCEPKG" ; fi
|
||||
WIKILINK=$(curl "$SILENT" "$checkSSL" -X 'GET' \
|
||||
"$GITEAHOST/api/v1/repos/$SOURCEORG/$SOURCEPKG" \
|
||||
-H 'accept: application/json' \
|
||||
@ -188,13 +189,13 @@ WIKILINK=$(curl "$SILENT" "$checkSSL" -X 'GET' \
|
||||
if [ $DEBUG ] ; then echo "WIKILINK=$WIKILINK" ; fi
|
||||
|
||||
# Update the repo with the changed bugzilla url and original wiki url
|
||||
if [ $DEBUG ] ; then echo "Updating Description, Bug and Wiki links" ; fi
|
||||
if [ $DEBUG ] ; then echo "Updating Bug and Wiki links" ; fi
|
||||
RESPONSE=$(curl "$SILENT" "$checkSSL" -X 'PATCH' \
|
||||
"$GITEAHOST/api/v1/repos/$TARGETORG/$TARGETPKG" \
|
||||
-H 'accept: application/json' \
|
||||
-H "Authorization: token $GITEAACCESSTOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"$GITEAHOST/api/v1/repos/$TARGETORG/$TARGETPKG" \
|
||||
-H 'accept: application/json' \
|
||||
-H "Authorization: token $GITEAACCESSTOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"has_issues": true,
|
||||
"external_tracker": {
|
||||
"external_tracker_format": "https://bugs.koozali.org/show_bug.cgi?id={index}",
|
||||
@ -284,6 +285,7 @@ git push origin &> /dev/null
|
||||
|
||||
# Do we want to transfer the new package into the source organisation
|
||||
if [ $TRANSFER ] ; then
|
||||
if [ $DEBUG ] ; then echo "Transferring $TARGETORG/$TARGETPKG to $SOURCEORG/$TARGETPKG" ; fi
|
||||
#Check that target package does not exist
|
||||
if [ $DEBUG ] ; then echo "Check if $SORCEORG/$TARGETPKG is there!" ; fi
|
||||
RESPONSE=$(curl $SILENT -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$SOURCEORG/$TARGETPKG")
|
||||
@ -323,6 +325,7 @@ if [ $TRANSFER ] ; then
|
||||
|
||||
# Transfer the package back to source organisation
|
||||
if [[ -z $EXISTS ]] ; then
|
||||
if [ $DEBUG ] ; then echo "Acrtual Transfer" ; fi
|
||||
RESPONSE=$(curl "$SILENT" "$checkSSL" -o /dev/null -w "%{http_code}" -X 'POST' \
|
||||
"$GITEAHOST/api/v1/repos/$TARGETORG/$TARGETPKG/transfer" \
|
||||
-H 'accept: application/json' \
|
||||
|
Loading…
Reference in New Issue
Block a user