diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hugo/devcontainer-feature.json | 7 | ||||
-rwxr-xr-x | src/hugo/install.sh | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/hugo/devcontainer-feature.json b/src/hugo/devcontainer-feature.json index 7a96d85..37a805d 100644 --- a/src/hugo/devcontainer-feature.json +++ b/src/hugo/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "hugo", - "version": "1.0.6", + "version": "1.1.0", "name": "Hugo", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/hugo", "options": { @@ -11,6 +11,11 @@ ], "default": "latest", "description": "Select or enter a version." + }, + "extended": { + "type": "boolean", + "default": false, + "description": "Install Hugo extended for SASS/SCSS changes" } }, "containerEnv": { diff --git a/src/hugo/install.sh b/src/hugo/install.sh index 778b552..c5cb628 100755 --- a/src/hugo/install.sh +++ b/src/hugo/install.sh @@ -106,7 +106,14 @@ if ! hugo version &> /dev/null ; then arch="64bit" fi - hugo_filename="hugo_${VERSION}_Linux-${arch}.tar.gz" + # Install extended version of hugo if desired + if [ "${EXTENDED}" = "true" ]; then + extended="extended_" + else + extended="" + fi + + hugo_filename="hugo_${extended}${VERSION}_Linux-${arch}.tar.gz" curl -fsSLO --compressed "https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${hugo_filename}" tar -xzf "$hugo_filename" -C "$installation_dir" |