Tighten docs publishing flow (#12572)

This commit is contained in:
Dan Albert
2020-09-30 11:24:00 -06:00
committed by GitHub
parent 22d16c69b7
commit ede19ef33b
3 changed files with 20 additions and 18 deletions

View File

@ -3,25 +3,9 @@ set -e
cd "$(dirname "$0")"
if [[ -n $CI_TAG ]]; then
LATEST_SOLANA_RELEASE_VERSION=$CI_TAG
elif [[ -z $CI_PULL_REQUEST ]]; then
LATEST_SOLANA_RELEASE_VERSION=$(\
curl -sSfL https://api.github.com/repos/solana-labs/solana/releases/latest \
| grep -m 1 tag_name \
| sed -ne 's/^ *"tag_name": "\([^"]*\)",$/\1/p' \
)
else
# Don't bother the `api.github.com` on pull requests to avoid getting rate
# limited
LATEST_SOLANA_RELEASE_VERSION=unknown-version
fi
if [[ -z "$LATEST_SOLANA_RELEASE_VERSION" ]]; then
echo Error: release version not defined
exit 1
fi
eval "$(../ci/channel-info.sh)"
LATEST_SOLANA_RELEASE_VERSION=$BETA_CHANNEL_LATEST_TAG
VERSION_FOR_DOCS_RS="${LATEST_SOLANA_RELEASE_VERSION:1}"
set -x