From dc8caeff5a11d05abf104b9494240cff4002e79c Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 7 Mar 2017 09:33:02 -0600 Subject: [PATCH] Detect pull request id in deployment --- package/deploy-bintray.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/package/deploy-bintray.sh b/package/deploy-bintray.sh index 834fbbdadf..efb3f405fb 100755 --- a/package/deploy-bintray.sh +++ b/package/deploy-bintray.sh @@ -30,7 +30,15 @@ if [ -z ${current_branch+x} ]; then current_branch="unknown" fi -if [ "$current_branch" == "master" ] && [ "$APPVEYOR_PULL_REQUEST_NUMBER" == "" ]; then +if [ ! -z ${GITHUB_PR_NUMBER+x} ]; then + PR_ID=$GITHUB_PR_NUMBER +fi +if [ ! -z ${APPVEYOR_PULL_REQUEST_NUMBER+x} ]; then + PR_ID=$APPVEYOR_PULL_REQUEST_NUMBER +fi + + +if [ "$current_branch" == "master" ] && [ -z ${PR_ID} ]; then # If building master, goes in slic3r_dev or slic3r, depending on whether or not this is a tagged build if [ -z ${TAGGED+x} ]; then SLIC3R_PKG=slic3r_dev @@ -40,8 +48,9 @@ if [ "$current_branch" == "master" ] && [ "$APPVEYOR_PULL_REQUEST_NUMBER" == "" version=$SLIC3R_BUILD_ID else # If building a branch, put the package somewhere else. + echo "Delploying pull request $PR_ID" SLIC3R_PKG=Slic3r_Branches - version=$SLIC3R_BUILD_ID-$current_branch + version=${SLIC3R_BUILD_ID}-PR${PR_ID} fi file=$1