1
1
#! /usr/bin/env bash
2
2
3
3
# 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 .
5
5
# https://wowchemy.com/docs/update/
6
6
#
7
7
# Command: bash ./update_wowchemy.sh
14
14
15
15
# Update the Wowchemy Hugo module
16
16
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 ./...
20
20
hugo mod tidy
21
21
}
22
22
23
23
# Update Netlify config
24
24
function update_netlify () {
25
25
# - Update Netlify.toml with required Hugo version
26
26
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
28
29
version=$( sed -n ' s/^[[:space:]]*min: //p' " tmp_get_version" | tr -d " '" )
29
30
version=" ${version} "
30
31
echo " Set Netlify Hugo version to v${version} "
@@ -37,6 +38,8 @@ function update_netlify () {
37
38
update_wowchemy
38
39
update_netlify
39
40
41
+ echo
42
+ echo " Warning: review the changes made by this helper script before pushing them to your site."
40
43
echo
41
44
echo " If there are breaking changes, the site structure, config, and/or front matter of content" \
42
45
" may need upgrading by following the steps in the relevant consecutive release notes."
0 commit comments