Skip to content

Commit

Permalink
switch release name to package version
Browse files Browse the repository at this point in the history
  • Loading branch information
ipcrm committed Oct 5, 2017
1 parent 8c3c11c commit 330eb2a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/after_build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv local 2.7.10

REL_NAME=$(python ./setup.py --version)


echo "Build Success"
echo "Creating github release"
API_JSON=$(printf '{"tag_name":"%s","target_commitish":"%s","name":"%s","body":"Release of version %s","draft":false,"prerelease":false}' $DISTELLI_BUILDNUM $DISTELLI_RELBRANCH $DISTELLI_BUILDNUM $DISTELLI_BUILDNUM)

API_JSON=$(printf '{"tag_name":"%s","target_commitish":"%s","name":"%s","body":"Release of version %s","draft":false,"prerelease":false}' $REL_NAME $DISTELLI_RELBRANCH $REL_NAME $REL_NAME)
REL_ID=$(curl -s -f -k -X POST -H "Content-Type: application/json" "https://api.github.com/repos/$GITHUB_USERNAME/$GITHUB_APPNAME/releases?access_token=$GITHUB_TOKEN" -d "$API_JSON"|./jq '.["id"]'|tr -d '\n')

echo "Uploading artifact to github release"
Expand Down

0 comments on commit 330eb2a

Please sign in to comment.