[med-svn] [Git][med-team/community/helper-scripts][master] 2 commits: Fix obtaining of group
Andreas Tille
gitlab at salsa.debian.org
Thu May 24 07:46:16 BST 2018
Andreas Tille pushed to branch master at Debian Med / community / helper-scripts
Commits:
21866dad by Andreas Tille at 2018-05-15T09:53:06+02:00
Fix obtaining of group
- - - - -
d61da287 by Andreas Tille at 2018-05-24T08:45:42+02:00
MOce salsarc file to ~/.ssh to enable calling this script from everywhere
- - - - -
1 changed file:
- inject-into-salsa-git
Changes:
=====================================
inject-into-salsa-git
=====================================
--- a/inject-into-salsa-git
+++ b/inject-into-salsa-git
@@ -2,14 +2,14 @@
set -eu
-SCRDIR=`dirname $0`
+SALSARC=~/.ssh/salsarc
-if [ ! -f ${SCRDIR}/salsarc ] ; then
- echo "Missing ${SCRDIR}/salsarc"
+if [ ! -f $SALSARC ] ; then
+ echo "Missing ${SALSARC}"
exit 1
fi
-. ${SCRDIR}/salsarc
+. ${SALSARC}
DEBPKGNAME=`dpkg-parsechangelog | awk '/^Source:/ {print $2}'`
SHORTDESC=`grep "^Description: " debian/control | head -n 1 | sed 's/^Description: //'`
@@ -19,13 +19,14 @@ SALSA_GROUP=`echo $VCSGIT | sed -e 's#.*://salsa.debian.org/\([^/]\+\)/.*#\1#'`
#echo $VCSGIT
#echo $SALSA_GROUP
-SALSA_GROUP_ID=$(curl --silent -f -XGET --header "PRIVATE-TOKEN: $SALSA_TOKEN" "$SALSA_URL/groups?all_available=false" | jq ".[] | select(.path == \"$SALSA_GROUP\") | .id")
+SALSA_GROUP_ID=$(curl -s -f -XGET --header "PRIVATE-TOKEN: $SALSA_TOKEN" "$SALSA_URL/groups/$SALSA_GROUP" | jq '.id')
set -x
curl "$SALSA_URL/projects?private_token=$SALSA_TOKEN" \
--data "path=${DEBPKGNAME}&namespace_id=${SALSA_GROUP_ID}&description=${SHORTDESC}&visibility=public"
+set +x
- git remote add origin git at salsa.debian.org:${SALSA_GROUP}/${DEBPKGNAME}.git
- git push origin master
- git push --all --set-upstream
- git push --tags
+git remote add origin git at salsa.debian.org:${SALSA_GROUP}/${DEBPKGNAME}.git
+git push origin master
+git push --all --set-upstream
+git push --tags
View it on GitLab: https://salsa.debian.org/med-team/community/helper-scripts/compare/85183769620e82ed1e416d45595dc07c16d1be34...d61da2870286d90034938e7e1f6160cecff01272
--
View it on GitLab: https://salsa.debian.org/med-team/community/helper-scripts/compare/85183769620e82ed1e416d45595dc07c16d1be34...d61da2870286d90034938e7e1f6160cecff01272
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180524/d43a098c/attachment-0001.html>
More information about the debian-med-commit
mailing list