From 4319e82fcfe54001c0fa4843dde0273e5a4ba07f Mon Sep 17 00:00:00 2001 From: flynn Date: Thu, 14 Feb 2019 05:14:39 +0100 Subject: [PATCH] rename file --- configure-gitlab-releases.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 configure-gitlab-releases.sh diff --git a/configure-gitlab-releases.sh b/configure-gitlab-releases.sh new file mode 100755 index 0000000..45bccf2 --- /dev/null +++ b/configure-gitlab-releases.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# Never worked + +PRIVATE_TOKEN="-gcyNiyf1iAHjDKPTwjy" +URL="https://git.zeus.gent/ZeusWPI/cat/releases/" + +if [[ $1 = "list" ]] +then + + curl \ + -H "Accept: application/json" -v \ + --header "PRIVATE-TOKEN: ${PRIVATE_TOKEN}" "${URL}" + +elif [[ $1 = "create" ]] +then + + curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: ${PRIVATE_TOKEN}" \ + --data '{ "name": "New release", "tag_name": "v0.1", "description": "Super nice release", "assets": { "links": [{ "name": "hoge", "url": "https://duck.com" }] } }' \ + --request POST "${URL}" + +fi \ No newline at end of file