send branch name on push

This commit is contained in:
Bella 2020-03-10 09:55:46 -04:00
parent a8443cb339
commit 89a4022476
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
1 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash
DIR="$(readlink -f ./build/libs/)"
JARDIR="$(ls "$DIR" | grep "release")"
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=@""$DIR"/"$JARDIR"" "$WEBHOOK"
#echo ""$DIR"/"$UWUOWO""