mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
snap: Fix empty BuildDate in "hugo version"
Previously, "snap run hugo version" returns an empty BuildDate like so: Hugo Static Site Generator v0.38 linux/amd64 BuildDate: Fix by overriding the default build target of snapcraft's go plugin.
This commit is contained in:
parent
a4deaeff0c
commit
294c0f8001
1 changed files with 8 additions and 3 deletions
|
@ -28,10 +28,15 @@ parts:
|
||||||
export PATH=$GOPATH/bin:$PATH
|
export PATH=$GOPATH/bin:$PATH
|
||||||
cd $GOPATH/src/github.com/gohugoio/hugo
|
cd $GOPATH/src/github.com/gohugoio/hugo
|
||||||
go get github.com/magefile/mage
|
go get github.com/magefile/mage
|
||||||
mage -v vendor test
|
mage -v vendor check
|
||||||
rm -f $GOPATH/bin/dep
|
build: |
|
||||||
rm -f $GOPATH/bin/mage
|
export GOPATH=$(dirname $SNAPCRAFT_PART_INSTALL)/go
|
||||||
|
export PATH=$GOPATH/bin:$PATH
|
||||||
|
[ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ] && mage hugoNoGitInfo || mage hugo
|
||||||
|
./hugo version
|
||||||
install: |
|
install: |
|
||||||
|
install -d $SNAPCRAFT_PART_INSTALL/bin
|
||||||
|
cp -a hugo $SNAPCRAFT_PART_INSTALL/bin/hugo
|
||||||
strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/hugo
|
strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/hugo
|
||||||
after: [go]
|
after: [go]
|
||||||
go:
|
go:
|
||||||
|
|
Loading…
Reference in a new issue