Commit 59202e38 authored by Laros's avatar Laros
Browse files

Better namespace support.

parent 9b112fe2
......@@ -8,6 +8,5 @@
"molecular_type": "RNA",
"experiment_type": "RNASeq",
"project_name": "jdoe-rnaseq",
"namespace": "sasc",
"namespace_id": "8"
"namespace": "sasc"
}
#!/bin/sh
gitlab project create \
--name {{ cookiecutter.project_name }} \
--namespace-id {{ cookiecutter.namespace_id }}
get_value() {
grep "$1: " | cut -f 2 -d ' '
}
namespace={{ cookiecutter.namespace }}
namespace_id=$(gitlab group search --query $namespace | get_value id)
namespace_opt=""
if [ $namespace_id ]; then
namespace_opt="--namespace-id $namespace_id"
else
namespace=$(gitlab current-user get | get_value username)
fi
git init
git add .
git commit -m "Initial commit."
gitlab project create --name {{ cookiecutter.project_name }} $namespace_opt
git remote add origin \
git@git.lumc.nl:{{ cookiecutter.namespace }}/{{ cookiecutter.project_name }}.git
git@git.lumc.nl:$namespace/{{ cookiecutter.project_name }}.git
git push --set-upstream origin master
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment