Skip to content

Commit 85b8712

Browse files
committed
feat: edit Updater given master branch renamed to main
1 parent 4fc961c commit 85b8712

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

update_wowchemy.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
# Wowchemy Updater
4-
# Checks for available updates and then asks to install any updates.
4+
# Helps update Hugo modules and the compatible Hugo version for Netlify.
55
# https://wowchemy.com/docs/update/
66
#
77
# Command: bash ./update_wowchemy.sh
@@ -14,17 +14,18 @@ fi
1414

1515
# Update the Wowchemy Hugo module
1616
function update_wowchemy () {
17-
# Update Wowchemy to the latest master version
18-
echo -e "Updating Wowchemy to the latest master version...\n"
19-
hugo mod get github.com/wowchemy/wowchemy-hugo-modules/wowchemy/@master
17+
# Update Wowchemy to the latest main version
18+
echo -e "Updating Hugo Modules to their latest version...\n"
19+
hugo mod get -u ./...
2020
hugo mod tidy
2121
}
2222

2323
# Update Netlify config
2424
function update_netlify () {
2525
# - Update Netlify.toml with required Hugo version
2626
if [ -f ./netlify.toml ]; then
27-
curl -o "tmp_get_version" https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/master/wowchemy/config.yaml
27+
echo "Attempting to get compatible Hugo version from https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/main/wowchemy/config.yaml ..."
28+
curl -o "tmp_get_version" https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/main/wowchemy/config.yaml
2829
version=$(sed -n 's/^[[:space:]]*min: //p' "tmp_get_version" | tr -d "'")
2930
version="${version}"
3031
echo "Set Netlify Hugo version to v${version}"
@@ -37,6 +38,8 @@ function update_netlify () {
3738
update_wowchemy
3839
update_netlify
3940

41+
echo
42+
echo "Warning: review the changes made by this helper script before pushing them to your site."
4043
echo
4144
echo "If there are breaking changes, the site structure, config, and/or front matter of content" \
4245
"may need upgrading by following the steps in the relevant consecutive release notes."

0 commit comments

Comments
 (0)