Skip to content

Commit 27dabcc

Browse files
committed
Fix prebuild script for readthedocs
1 parent dc6e53d commit 27dabcc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: docs/prebuild.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ function get_sha256() {
1414
curl -L "$1" | python -uc 'import hashlib, sys; print(hashlib.sha256(sys.stdin.buffer.read()).hexdigest())'
1515
}
1616

17-
if [[ "${READTHEDOCS_VERSION_TYPE}" == branch && "${READTHEDOCS_VERSION_NAME}" == master ]]; then
17+
if [[ "${READTHEDOCS_VERSION_TYPE}" == branch && "${READTHEDOCS_VERSION}" == latest ]]; then
1818
# a commit was pushed to the master branch
1919
url="https://github.com/tweag/rules_haskell/archive/${READTHEDOCS_GIT_COMMIT_HASH}.tar.gz"
2020
hash=$( get_sha256 "$url" )
2121
sed -i \
22+
-e 's/To use a released version/To use the latest commit/' \
2223
-e '/name = "rules_haskell"/,/url = "/{' \
2324
-e ' s%x\{64\}%'"${hash}"'%; ' \
2425
-e ' s%/releases/download/vM[.]NN/rules_haskell-%/archive/%' \
@@ -38,5 +39,5 @@ elif [[ "${READTHEDOCS_VERSION_TYPE}" == tag && "${READTHEDOCS_GIT_IDENTIFIER}"
3839
-e '}' \
3940
docs/haskell-use-cases.rst
4041
else
41-
die "cannot handle version type ${READTHEDOCS_VERSION_TYPE} / ${READTHEDOCS_VERSION_NAME}"
42+
echo "skipping version type ${READTHEDOCS_VERSION_TYPE} / ${READTHEDOCS_VERSION_NAME}"
4243
fi

0 commit comments

Comments
 (0)