2020-03-12 08:36:19 -07:00
|
|
|
#!/usr/bin/env bash
|
2020-03-12 14:34:28 -07:00
|
|
|
set -e
|
2020-07-10 22:11:07 -07:00
|
|
|
|
2020-03-12 14:34:28 -07:00
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
2020-09-30 10:24:00 -07:00
|
|
|
eval "$(../ci/channel-info.sh)"
|
2020-06-03 11:08:32 -07:00
|
|
|
|
2020-10-12 14:15:44 -07:00
|
|
|
if [[ -n $BETA_CHANNEL_LATEST_TAG ]]; then
|
|
|
|
LATEST_SOLANA_RELEASE_VERSION=$BETA_CHANNEL_LATEST_TAG
|
|
|
|
else
|
|
|
|
LATEST_SOLANA_RELEASE_VERSION=$STABLE_CHANNEL_LATEST_TAG
|
|
|
|
fi
|
2020-09-01 12:47:29 -07:00
|
|
|
VERSION_FOR_DOCS_RS="${LATEST_SOLANA_RELEASE_VERSION:1}"
|
|
|
|
|
2020-03-12 08:36:19 -07:00
|
|
|
set -x
|
2020-03-12 14:34:28 -07:00
|
|
|
if [[ -n $CI ]]; then
|
2020-11-21 17:56:23 -08:00
|
|
|
sed --version || { echo "Error: Incompatible version of sed, use gnu sed"; exit 1; }
|
2020-04-03 10:21:34 -07:00
|
|
|
find src/ -name \*.md -exec sed -i "s/LATEST_SOLANA_RELEASE_VERSION/$LATEST_SOLANA_RELEASE_VERSION/g" {} \;
|
2020-09-01 12:47:29 -07:00
|
|
|
find src/ -name \*.md -exec sed -i "s/VERSION_FOR_DOCS_RS/$VERSION_FOR_DOCS_RS/g" {} \;
|
2020-03-12 14:34:28 -07:00
|
|
|
fi
|