Add format-url.sh
This commit is contained in:
20
ci/format-url.sh
Executable file
20
ci/format-url.sh
Executable file
@ -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,10 +62,13 @@ echo --- Saving build artifacts
|
|||||||
source ci/upload-ci-artifact.sh
|
source ci/upload-ci-artifact.sh
|
||||||
upload-ci-artifact solana-release.tar.bz2
|
upload-ci-artifact solana-release.tar.bz2
|
||||||
|
|
||||||
if [[ -z $DO_NOT_PUBLISH_TAR ]]; then
|
if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
|
||||||
echo --- AWS S3 Store
|
echo Skipped due to DO_NOT_PUBLISH_TAR
|
||||||
if [[ -z $DRYRUN ]]; then
|
exit 0
|
||||||
(
|
fi
|
||||||
|
|
||||||
|
echo --- AWS S3 Store
|
||||||
|
(
|
||||||
set -x
|
set -x
|
||||||
if [[ ! -r s3cmd-2.0.1/s3cmd ]]; then
|
if [[ ! -r s3cmd-2.0.1/s3cmd ]]; then
|
||||||
rm -rf s3cmd-2.0.1.tar.gz s3cmd-2.0.1
|
rm -rf s3cmd-2.0.1.tar.gz s3cmd-2.0.1
|
||||||
@ -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 \
|
$DRYRUN python ./s3cmd-2.0.1/s3cmd --acl-public put solana-release.tar.bz2 \
|
||||||
s3://solana-release/"$CHANNEL_OR_TAG"/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
|
||||||
|
)
|
||||||
|
Reference in New Issue
Block a user