seperate name and upload scripts

This commit is contained in:
Bella 2020-03-10 10:25:30 -04:00
parent 49238c943e
commit c9e3bc67bd
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
3 changed files with 6 additions and 4 deletions

View File

@ -16,4 +16,5 @@ deploy:
tags: true
after_success:
- chmod +x scripts/hook.sh
- "./scripts/hook.sh"
- "./scripts/hookName.sh"
- "./scripts/hookUpload.sh"

View File

@ -1,7 +1,4 @@
#!/bin/bash
CURDIR="$(readlink -f ./build/libs/)"
JARDIR="$(ls "$CURDIR" | grep "release")"
BRANCH="$(git branch | grep "*")"
BRANCH="${BRANCH:2}"
curl -H "Content-Type: application/json" -X POST -d '{"username": "Github Actions", "content": "**Branch:** `'$BRANCH'`"}' "$WEBHOOK"
curl -F content=@""$CURDIR"/"$JARDIR"" "$WEBHOOK"

4
scripts/hookUpload.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
CURDIR="$(readlink -f ./build/libs/)"
JARDIR="$(ls "$CURDIR" | grep "release")"
curl -F content=@""$CURDIR"/"$JARDIR"" "$WEBHOOK"