Add format-url.sh
This commit is contained in:
parent
0659971ecf
commit
50e8666a14
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Formats a URL to be clickable from a Buildkite log
|
||||
#
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
echo "Usage: $0 url"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $BUILDKITE ]]; then
|
||||
echo "$1"
|
||||
else
|
||||
# shellcheck disable=SC2001
|
||||
URL="$(echo "$1" | sed 's/;/%3b/g')" # Escape ;
|
||||
|
||||
printf '\033]1339;url='
|
||||
echo -n "$URL"
|
||||
printf '\a\n'
|
||||
fi
|
|
@ -62,9 +62,12 @@ echo --- Saving build artifacts
|
|||
source ci/upload-ci-artifact.sh
|
||||
upload-ci-artifact solana-release.tar.bz2
|
||||
|
||||
if [[ -z $DO_NOT_PUBLISH_TAR ]]; then
|
||||
if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
|
||||
echo Skipped due to DO_NOT_PUBLISH_TAR
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo --- AWS S3 Store
|
||||
if [[ -z $DRYRUN ]]; then
|
||||
(
|
||||
set -x
|
||||
if [[ ! -r s3cmd-2.0.1/s3cmd ]]; then
|
||||
|
@ -75,10 +78,7 @@ if [[ -z $DO_NOT_PUBLISH_TAR ]]; then
|
|||
|
||||
$DRYRUN python ./s3cmd-2.0.1/s3cmd --acl-public put solana-release.tar.bz2 \
|
||||
s3://solana-release/"$CHANNEL_OR_TAG"/solana-release.tar.bz2
|
||||
)
|
||||
else
|
||||
echo Skipped due to DRYRUN
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
||||
echo Published to:
|
||||
$DRYRUN ci/format-url.sh http://solana-release.s3.amazonaws.com/"$CHANNEL_OR_TAG"/solana-release.tar.bz2
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue