Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/snap
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2018-09-30 08:29:57 +0300
committerAnthony Fok <foka@debian.org>2018-10-01 08:02:34 +0300
commitfa873a6cb3f0fa81002fcd725ecd52fc4b9df48f (patch)
treed3cee5164f23991fbc13aba1eac8a707654c465a /snap
parentfb732d5322381ee7f3a849258419cef7bbf1487b (diff)
snap: Use build-snaps instead of building go from source
See https://forum.snapcraft.io/t/go-part-fails-with-go1-11-if-go-mod-exists-in-the-top-level-directory/7546/11
Diffstat (limited to 'snap')
-rw-r--r--snap/snapcraft.yaml22
1 files changed, 4 insertions, 18 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index a3301a23e..4c85cf842 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -24,32 +24,18 @@ parts:
prime:
- bin/git
- go:
- # Hugo's go.mod would interfere with the build of Go 1.11 in the
- # parts/go/build/ subdirectory. Move go.mod out of the way
- # as a workaround. (Note: 'override-build' does not work here,
- # hence the use of the deprecated 'prepare' keyword.)
- # See https://forum.snapcraft.io/t/go-plugin-go1-11-fails-if-go-mod-exists-in-the-top-level-directory/7546
- prepare: |
- set -x
- ( cd ../../.. && mv -v go.mod go.mod~ )
- source-tag: go1.11
-
hugo:
+ plugin: nil
+ build-snaps: [go/1.11/stable]
source: .
- after: [go]
- plugin: go
- go-importpath: github.com/gohugoio/hugo
override-build: |
set -ex
echo "\nStarting override-build:"
- ( cd ../../.. && mv -v go.mod~ go.mod || : )
export GO111MODULE=on
- export GOPATH=$(dirname $SNAPCRAFT_PART_INSTALL)/go
- export PATH=$GOPATH/bin:$PATH
+ export GOPATH=$(realpath ../go)
+ export PATH=$GOPATH/bin:/snap/bin:$PATH
- cd $GOPATH/src/github.com/gohugoio/hugo
echo ' * Running "go get -v github.com/magefile/mage"...'
go get -v github.com/magefile/mage