aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resources/libraries/bash/function/hugo.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/resources/libraries/bash/function/hugo.sh b/resources/libraries/bash/function/hugo.sh
index ba5591b72e..6c201d9efd 100644
--- a/resources/libraries/bash/function/hugo.sh
+++ b/resources/libraries/bash/function/hugo.sh
@@ -26,12 +26,12 @@ function go_install () {
aarch64) architecture="arm64" ;;
esac
- go_version="go1.20.2.linux-${architecture}.tar.gz"
+ go_version="go1.22.5.linux-${architecture}.tar.gz"
go_url="https://go.dev/dl"
wget "${go_url}/${go_version}"
rm -rf "/usr/local/go"
- tar -C "/usr/local" -xzf "go1.20.2.linux-${architecture}.tar.gz"
- rm "go1.20.2.linux-${architecture}.tar.gz"
+ tar -C "/usr/local" -xzf "go1.22.5.linux-${architecture}.tar.gz"
+ rm "go1.22.5.linux-${architecture}.tar.gz"
export PATH=$PATH:/usr/local/go/bin
}
@@ -45,6 +45,10 @@ function hugo_build_site () {
# Functions called:
# - die - Print to stderr and exit.
+ if ! install go; then
+ go_install || die "Please install Go!"
+ fi
+
if ! installed hugo; then
hugo_install || die "Please install Hugo!"
fi
@@ -64,6 +68,10 @@ function hugo_init_modules () {
# Functions called:
# - die - Print to stderr and exit.
+ if ! install go; then
+ go_install || die "Please install Go!"
+ fi
+
if ! installed hugo; then
hugo_install || die "Please install Hugo!"
fi