Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ fi

REPO="${PWD##*/}"
BUCKET="${BUCKET:-llvm-obfuscator-arm}"
PRS_BUCKET="${PRS_BUCKET:-llvm-obfuscator-arm-pull-requests}"

BUILD_VERSION="$(git describe --tags --dirty --always)"
BUILD_PATH="$REPO/$BUILD_VERSION"
Expand All @@ -41,12 +40,13 @@ echo "Publish TAG ($TRAVIS_TAG)"

for file in "$@"; do
KEY="$BUILD_PATH/$(basename "$file")"
OBJECT="s3://$BUCKET/$KEY"
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
if [[ "$TRAVIS_BRANCH" == master || "$TRAVIS_TAG" == v* || "$TRAVIS_BRANCH" == v*-release ]]; then
OBJECT="s3://$BUCKET/$KEY"
aws s3 cp "$file" "$OBJECT"
fi
else
aws s3api put-object --no-sign-request --bucket "$PRS_BUCKET" --key "$KEY" --body "$file" --acl public-read
aws s3 cp "$file" "$OBJECT"
fi
done