forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·40 lines (32 loc) · 969 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
set -ex
cd "$(dirname "$0")"
# shellcheck source=ci/env.sh
source ../ci/env.sh
: "${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
# 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
# Build from /src into /build
npm run build
echo $?
# Publish only from merge commits and beta release tags
if [[ -n $CI ]]; then
if [[ -z $CI_PULL_REQUEST ]]; then
if [[ -n $CI_TAG ]] && [[ $CI_TAG != $BETA_CHANNEL* ]]; then
echo "not a beta tag"
exit 0
fi
./publish-docs.sh
fi
fi