Skip to content
Commits on Source (2)
......@@ -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@salsa.debian.org:${SALSA_GROUP}/${DEBPKGNAME}.git
git push origin master
git push --all --set-upstream
git push --tags
git remote add origin git@salsa.debian.org:${SALSA_GROUP}/${DEBPKGNAME}.git
git push origin master
git push --all --set-upstream
git push --tags