From e98bba075067a858b02eda8958ae248ced6c178e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Borbo=C3=ABn?= <ponsfrilus@gmail.com> Date: Fri, 30 Aug 2019 17:31:39 +0200 Subject: [PATCH] [WIP] Trying to fix --- deploy.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index a61fc31..35ef48f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -3,10 +3,12 @@ env -echo $MY_TOKEN - echo "Hello from deploy.sh" +echo "My token is $MY_TOKEN" + +whoami + # git clone git@gitlab.epfl.ch:idevelop/howtogitlabrunner.wiki.git wiki # cp README.pdf wiki/public/ # echo \n$(date '+%Y-%m-%d %H:%M:%S') >> wiki/home.md @@ -19,10 +21,17 @@ echo "Hello from deploy.sh" export RELEASE_V=v$(date '+%s') echo "Creating release: ${RELEASE_V}" git tag -f -a -m "My sweet release $(date '+%Y-%m-%d %H:%M:%S')" ${RELEASE_V} +echo "END OF TAGGING" git push -f --tags +echo "END OF PUSH" + +echo "BEGIN UPLOAD" export UPLOADED_FILE_URL=$(curl --request POST --header "Private-Token: ${MY_TOKEN}" --form "file=@README.pdf" "https://gitlab.epfl.ch/api/v4/projects/1298/uploads" | jq .url) +echo "END UPLOAD" +echo "BEGIN POST RELEASE" curl --request POST \ --header 'Content-Type: application/json' \ --header "Private-Token: ${MY_TOKEN}" \ --data '{"name": "New README release", "tag_name": "${RELEASE_V}", "description": "Release with the PDF [README.pdf](${UPLOADED_FILE_URL})"}' \ "https://gitlab.epfl.ch/api/v4/projects/1298/releases" +echo "END POST RELEASE" -- GitLab