snapcraft: Add vendoring support - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 2ed75f346265b90f60ace313cca70740daecc437
DIR parent 9d9ec1ddd9ab5fec2119fc6fc5eb308509352d21
HTML Author: Anthony Fok <foka@debian.org>
Date: Sat, 25 Mar 2017 02:41:58 -0600
snapcraft: Add vendoring support
Also, build with go1.8, run "make test", and strip the binary.
Fixes #3226
Diffstat:
M snapcraft.yaml | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
---
DIR diff --git a/snapcraft.yaml b/snapcraft.yaml
@@ -17,8 +17,21 @@ parts:
hugo:
source: .
plugin: go
- go-importpath: "github.com/spf13/hugo"
+ go-importpath: github.com/spf13/hugo
build-packages:
- git
+ - make
stage-packages:
- python-pygments
+ prepare: |
+ export GOPATH=$(dirname $SNAPCRAFT_PART_INSTALL)/go
+ export PATH=$GOPATH/bin:$PATH
+ cd $GOPATH/src/github.com/spf13/hugo
+ make vendor
+ make test
+ rm -f $GOPATH/bin/govendor
+ install: |
+ strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/hugo
+ after: [go]
+ go:
+ source-tag: go1.8