[Pkg-xfce-commits] [Git][xfce-team/git-migration][master] 2 commits: use gitlab syntax for git remote
Yves-Alexis Perez
corsac at debian.org
Tue Jan 30 21:32:14 UTC 2018
Yves-Alexis Perez pushed to branch master at xfce / git-migration
Commits:
9ffa2ae2 by Yves-Alexis Perez at 2018-01-30T22:12:40+01:00
use gitlab syntax for git remote
- - - - -
56e94021 by Yves-Alexis Perez at 2018-01-30T22:18:16+01:00
add script for easy repository creation
- - - - -
2 changed files:
- migrate-pkg.sh
- + salsa-create-repository.sh
Changes:
=====================================
migrate-pkg.sh
=====================================
--- a/migrate-pkg.sh
+++ b/migrate-pkg.sh
@@ -22,7 +22,7 @@ git checkout --orphan upstream
git commit --allow-empty -m 'Initial upstream branch.'
git checkout --orphan master
-git remote add origin git+ssh://salsa.debian.org/git/xfce-team/$CATEGORY/$PACKAGE
+git remote add origin git at salsa.debian.org:xfce-team/$CATEGORY/$PACKAGE
git svn clone \
--authors-file=../authors.txt \
=====================================
salsa-create-repository.sh
=====================================
--- /dev/null
+++ b/salsa-create-repository.sh
@@ -0,0 +1,42 @@
+#! /bin/sh
+# create a new repository under the Xfce namespace on salsa using a token API
+# inspired by http://www.df7cb.de/blog/2017/Salsa_batch_import.html
+
+set -e
+
+if [ -z "$2" ]; then
+ echo "Usage: $0 <category> <packagename>"
+ exit 1;
+fi
+
+CATEGORY=$1
+PACKAGE=$2
+
+SALSA_TOKEN=$(cat ../salsa-token.txt)
+SALSA_URL="https://salsa.debian.org/api/v4"
+
+if [ -z "$SALSA_TOKEN" ];
+then
+ echo "Please add your API token in ../salsa-token.txt" >&2
+fi
+
+case $CATEGORY in
+ apps)
+ salsa_namespace=2711
+ ;;
+ desktop)
+ salsa_namespace=2710
+ ;;
+ goodies)
+ salsa_namespace=2709
+ ;;
+ *)
+ echo "Unknown category $CATEGORY" >&2
+ exit 1
+ ;;
+esac
+
+description="Debian packaging for $PACKAGE"
+
+curl -f "$SALSA_URL/projects?private_token=$SALSA_TOKEN" \
+ --data "path=$PACKAGE&namespace_id=$salsa_namespace&description=$description&visibility=public"
View it on GitLab: https://salsa.debian.org/xfce-team/git-migration/compare/db3c563292c58b05f3c8bdc86dacadc0543b5e66...56e940210d861d29024c7f56b21fbed449207d96
---
View it on GitLab: https://salsa.debian.org/xfce-team/git-migration/compare/db3c563292c58b05f3c8bdc86dacadc0543b5e66...56e940210d861d29024c7f56b21fbed449207d96
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-commits/attachments/20180130/f82b996f/attachment-0001.html>
More information about the Pkg-xfce-commits
mailing list