Skip to content

Commit

Permalink
snapcraft: Set GO111MODULE=on in override-build script
Browse files Browse the repository at this point in the history
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
  • Loading branch information
anthonyfok committed Sep 25, 2018
1 parent 48413d7 commit b7706d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ description: |
with content and templates and renders them into a full HTML website.
confinement: strict
grade: devel # "devel" or "stable"
environment:
GO111MODULE: on

apps:
hugo:
Expand All @@ -25,6 +23,7 @@ parts:
- 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
Expand Down

0 comments on commit b7706d6

Please sign in to comment.