Skip to content

Commit

Permalink
Adding some debug and extra conditional.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmundra committed Sep 1, 2024
1 parent 9143ca9 commit c7eee59
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .config/mkdocs/check-material-insiders-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@ latest_tag=$(git ls-remote --tags --exit-code --refs "${material_insiders_repo}"
| sed -E 's/^[[:xdigit:]]+[[:space:]]+refs\/tags\/(.+)/\1/g' \
| sort --version-sort | tail -n1)

echo $latest_tag

# Get latest installed tag from poetry.
installed_tag=$(poetry -C .config/mkdocs/ show mkdocs-material | awk '/version/ { print $3 }' | sed 's/+insiders./-insiders-/')

echo $installed_tag

# Compare tags
if [ "$latest_tag" = "$installed_tag" ]; then
echo "Latest material-insiders version ${latest_tag} already installed."
else
echo "Newer material-insiders version available: ${latest_tag}. Installing..."
poetry -C .config/mkdocs/ add git+${material_insiders_repo}#"${latest_tag}"
if [ ! -z "$latest_tag" ]; then
if [ "$latest_tag" = "$installed_tag" ]; then
echo "Latest material-insiders version ${latest_tag} already installed."
else
echo "Newer material-insiders version available: ${latest_tag}. Installing..."
poetry -C .config/mkdocs/ add git+${material_insiders_repo}#"${latest_tag}"
fi
fi

0 comments on commit c7eee59

Please sign in to comment.