Apparently, snapcraft's yet-to-be-documented environment declaration
feature is for run-time only.
See https://discourse.gohugo.io/t/hugo-0-48-released/13908/9
and https://forum.snapcraft.io/t/declaratively-defining-environment-variables/175/29
with content and templates and renders them into a full HTML website.
confinement: strict
grade: devel # "devel" or "stable"
-environment:
- GO111MODULE: on
apps:
hugo:
- git
override-build: |
echo "\nStarting override-build:"
+ export GO111MODULE=on
export GOPATH=$(dirname $SNAPCRAFT_PART_INSTALL)/go
export PATH=$GOPATH/bin:$PATH
cd $GOPATH/src/github.com/gohugoio/hugo