2018-11-26 17:39:20 -08:00
|
|
|
#!/usr/bin/env bash
|
2020-07-10 22:11:07 -07:00
|
|
|
set -ex
|
|
|
|
|
2020-07-18 07:31:54 -07:00
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
2020-07-10 22:11:07 -07:00
|
|
|
# shellcheck source=ci/env.sh
|
|
|
|
source ../ci/env.sh
|
2018-11-26 17:39:20 -08:00
|
|
|
|
2020-07-10 22:11:07 -07:00
|
|
|
: "${rust_stable_docker_image:=}" # Pacify shellcheck
|
|
|
|
|
|
|
|
# shellcheck source=ci/rust-version.sh
|
|
|
|
source ../ci/rust-version.sh
|
|
|
|
../ci/docker-run.sh "$rust_stable_docker_image" docs/build-cli-usage.sh
|
|
|
|
../ci/docker-run.sh "$rust_stable_docker_image" docs/convert-ascii-to-svg.sh
|
|
|
|
./set-solana-release-tag.sh
|
|
|
|
|
2021-05-27 21:21:37 -07:00
|
|
|
# Get current channel
|
|
|
|
eval "$(../ci/channel-info.sh)"
|
|
|
|
|
|
|
|
# Synchronize translations with Crowdin only on stable channel
|
|
|
|
if [ "$CHANNEL" = stable ]; then
|
|
|
|
echo "Downloading & updating translations..."
|
|
|
|
npm run crowdin:download
|
|
|
|
npm run crowdin:upload
|
|
|
|
fi
|
|
|
|
|
2020-07-10 22:11:07 -07:00
|
|
|
# Build from /src into /build
|
|
|
|
npm run build
|
2020-11-11 17:46:24 -08:00
|
|
|
echo $?
|
2020-07-10 22:11:07 -07:00
|
|
|
|
2021-02-05 22:39:04 -08:00
|
|
|
# Publish only from merge commits and beta release tags
|
2020-07-10 22:11:07 -07:00
|
|
|
if [[ -n $CI ]]; then
|
|
|
|
if [[ -z $CI_PULL_REQUEST ]]; then
|
2021-02-05 22:39:04 -08:00
|
|
|
if [[ -n $CI_TAG ]] && [[ $CI_TAG != $BETA_CHANNEL* ]]; then
|
|
|
|
echo "not a beta tag"
|
|
|
|
exit 0
|
|
|
|
fi
|
2020-07-14 06:56:14 -07:00
|
|
|
./publish-docs.sh
|
2020-07-10 22:11:07 -07:00
|
|
|
fi
|
|
|
|
fi
|