Skip to content

Commit

Permalink
ci: fix test of whether docs are dev or release version
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Jun 14, 2024
1 parent 7fb31cd commit 6739feb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ci/scripts/website_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ main() {
exit 1
fi

local -r regex='^([0-9]+\.[0-9]+\.[0-9]+)$'
# Docs use the ADBC release so it will just be 12, 13, 14, ...
local -r regex='^([0-9]+?)$'
local directory="main"
if [[ "${new_version}" =~ $regex ]]; then
echo "Adding docs for version ${new_version}"
cp -r "${docs}" "${site}/${new_version}"
git -C "${site}" add --force "${new_version}"
directory="${new_version}"
else
# Assume this is dev docs
echo "Adding dev docs for version ${new_version}"
rm -rf "${site}/main"
cp -r "${docs}" "${site}/main"
git -C "${site}" add --force "main"
Expand Down

0 comments on commit 6739feb

Please sign in to comment.