mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
snapcraft: Add vendoring support
Also, build with go1.8, run "make test", and strip the binary. Fixes #3226
This commit is contained in:
parent
9d9ec1ddd9
commit
2ed75f3462
1 changed files with 14 additions and 1 deletions
|
@ -17,8 +17,21 @@ parts:
|
||||||
hugo:
|
hugo:
|
||||||
source: .
|
source: .
|
||||||
plugin: go
|
plugin: go
|
||||||
go-importpath: "github.com/spf13/hugo"
|
go-importpath: github.com/spf13/hugo
|
||||||
build-packages:
|
build-packages:
|
||||||
- git
|
- git
|
||||||
|
- make
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- python-pygments
|
- 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
|
||||||
|
|
Loading…
Reference in a new issue