diff options
author | George Cushen <gcushen@users.noreply.github.com> | 2021-02-06 00:20:17 +0300 |
---|---|---|
committer | George Cushen <gcushen@users.noreply.github.com> | 2021-02-06 00:20:17 +0300 |
commit | 85b8712c4c0ac22d16950138f2daffbd9d3d34e5 (patch) | |
tree | cb1c99ed4d93471b3e280e9b68f83930a6f2ea6a /update_wowchemy.sh | |
parent | 4fc961c07652bcd4db625a6960c48c0ffb23dba3 (diff) |
feat: edit Updater given master branch renamed to main
Diffstat (limited to 'update_wowchemy.sh')
-rwxr-xr-x | update_wowchemy.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/update_wowchemy.sh b/update_wowchemy.sh index 0bcc241a..e80df53a 100755 --- a/update_wowchemy.sh +++ b/update_wowchemy.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Wowchemy Updater -# Checks for available updates and then asks to install any updates. +# Helps update Hugo modules and the compatible Hugo version for Netlify. # https://wowchemy.com/docs/update/ # # Command: bash ./update_wowchemy.sh @@ -14,9 +14,9 @@ fi # Update the Wowchemy Hugo module function update_wowchemy () { - # Update Wowchemy to the latest master version - echo -e "Updating Wowchemy to the latest master version...\n" - hugo mod get github.com/wowchemy/wowchemy-hugo-modules/wowchemy/@master + # Update Wowchemy to the latest main version + echo -e "Updating Hugo Modules to their latest version...\n" + hugo mod get -u ./... hugo mod tidy } @@ -24,7 +24,8 @@ function update_wowchemy () { function update_netlify () { # - Update Netlify.toml with required Hugo version if [ -f ./netlify.toml ]; then - curl -o "tmp_get_version" https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/master/wowchemy/config.yaml + echo "Attempting to get compatible Hugo version from https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/main/wowchemy/config.yaml ..." + curl -o "tmp_get_version" https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/main/wowchemy/config.yaml version=$(sed -n 's/^[[:space:]]*min: //p' "tmp_get_version" | tr -d "'") version="${version}" echo "Set Netlify Hugo version to v${version}" @@ -38,6 +39,8 @@ update_wowchemy update_netlify echo +echo "Warning: review the changes made by this helper script before pushing them to your site." +echo echo "If there are breaking changes, the site structure, config, and/or front matter of content" \ "may need upgrading by following the steps in the relevant consecutive release notes." echo |