From 7e72a0d8a164b6f8a1c989dbb93b4e4f3424f71b Mon Sep 17 00:00:00 2001 From: Elvis de Freitas Date: Sun, 15 Oct 2017 02:20:41 -0200 Subject: [PATCH] #34 fixing env and release upload --- builder | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builder b/builder index ba94478b1..c9343aff8 100755 --- a/builder +++ b/builder @@ -8,7 +8,7 @@ REPO_URL=mageddo/dns-proxy-server create_release(){ # release notes - DESC=$(cat RELEASE-NOTES.md | awk 'BEGIN {RS="|"} {print substr($0, 0, index(substr($0, 3), "###"))}' | sed ':a;N;$!ba;s/\n/\\\\n/g') && \ + DESC=$(cat RELEASE-NOTES.md | awk 'BEGIN {RS="|"} {print substr($0, 0, index(substr($0, 3), "###"))}' | sed ':a;N;$!ba;s/\n/\\r\\n/g') && \ PAYLOAD='{ "tag_name": "%s", "target_commitish": "%s", @@ -17,7 +17,7 @@ create_release(){ "draft": false, "prerelease": true }' - PAYLOAD=$(printf "$PAYLOAD", '1.0' 'MASTER' '1.0' "$DESC") + PAYLOAD=$(printf "$PAYLOAD" $APP_VERSION $CURRENT_BRANCH $APP_VERSION "$DESC") TAG_ID=$(curl -i -s -f -X POST "https://api.github.com/repos/$REPO_URL/releases?access_token=$REPO_TOKEN" \ --data "$PAYLOAD" | grep -o -E 'id": [0-9]+'| awk '{print $2}' | head -n 1) } @@ -31,8 +31,8 @@ case $1 in setup-repository ) git remote remove origin && git remote add origin https://${REPO_TOKEN}@github.com/$REPO_URL.git - git checkout -b build_branch ${TRAVIS_BRANCH} - echo "> Repository added, travisBranch=${TRAVIS_BRANCH}" + git checkout -b build_branch ${CURRENT_BRANCH} + echo "> Repository added, travisBranch=${CURRENT_BRANCH}" ;;