Skip to content

Commit 7e72a0d

Browse files
committed
#34 fixing env and release upload
1 parent 654534b commit 7e72a0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builder

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ REPO_URL=mageddo/dns-proxy-server
88

99
create_release(){
1010
# release notes
11-
DESC=$(cat RELEASE-NOTES.md | awk 'BEGIN {RS="|"} {print substr($0, 0, index(substr($0, 3), "###"))}' | sed ':a;N;$!ba;s/\n/\\\\n/g') && \
11+
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') && \
1212
PAYLOAD='{
1313
"tag_name": "%s",
1414
"target_commitish": "%s",
@@ -17,7 +17,7 @@ create_release(){
1717
"draft": false,
1818
"prerelease": true
1919
}'
20-
PAYLOAD=$(printf "$PAYLOAD", '1.0' 'MASTER' '1.0' "$DESC")
20+
PAYLOAD=$(printf "$PAYLOAD" $APP_VERSION $CURRENT_BRANCH $APP_VERSION "$DESC")
2121
TAG_ID=$(curl -i -s -f -X POST "https://api.github.com/repos/$REPO_URL/releases?access_token=$REPO_TOKEN" \
2222
--data "$PAYLOAD" | grep -o -E 'id": [0-9]+'| awk '{print $2}' | head -n 1)
2323
}
@@ -31,8 +31,8 @@ case $1 in
3131

3232
setup-repository )
3333
git remote remove origin && git remote add origin https://${REPO_TOKEN}@github.com/$REPO_URL.git
34-
git checkout -b build_branch ${TRAVIS_BRANCH}
35-
echo "> Repository added, travisBranch=${TRAVIS_BRANCH}"
34+
git checkout -b build_branch ${CURRENT_BRANCH}
35+
echo "> Repository added, travisBranch=${CURRENT_BRANCH}"
3636

3737
;;
3838

0 commit comments

Comments
 (0)