forked from kubernetes/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Hugo to 0.52 (kubernetes#11552)
* Update Hugo version and apply HTML minification to production builds * Use full flag names for clarity * Remove Hugo installation logic out of Travis config and into Makefile * Add Hugo version checking script * Fix Netlify config version
- Loading branch information
1 parent
9c1248e
commit aac7862
Showing
5 changed files
with
37 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
MAIN_HUGO_VERSION=$1 | ||
NETLIFY_HUGO_VERSION=$(cat netlify.toml | grep HUGO_VERSION | awk '{ print $3 }' | tr -d '"') | ||
|
||
echo ${NETLIFY_HUGO_VERSION} | ||
|
||
if [[ ${MAIN_HUGO_VERSION} != ${NETLIFY_HUGO_VERSION} ]]; then | ||
echo """ | ||
[FAILURE] The Hugo version set in the Makefile is ${MAIN_HUGO_VERSION} while the version in netlify.toml is ${NETLIFY_HUGO_VERSION} | ||
[FAILURE] Please update these versions so that they are same (consider the higher of the two versions as canonical). | ||
""" | ||
exit 1 | ||
else | ||
echo "[SUCCESS] The Hugo versions match between the Makefile and netlify.toml" | ||
exit 0 | ||
fi | ||
|