github.com/olliephillips/hugo@v0.42.2/snapcraft.yaml (about) 1 name: hugo 2 version: "0.42.2" 3 summary: Fast and Flexible Static Site Generator 4 description: | 5 Hugo is a static HTML and CSS website generator written in Go. It is 6 optimized for speed, easy use and configurability. Hugo takes a directory 7 with content and templates and renders them into a full HTML website. 8 confinement: strict 9 grade: stable # "devel" or "stable" 10 11 apps: 12 hugo: 13 command: bin/hugo 14 completer: hugo-completion 15 plugs: [home, network-bind, removable-media] 16 17 parts: 18 hugo: 19 source: . 20 plugin: go 21 go-importpath: github.com/gohugoio/hugo 22 build-packages: 23 - git 24 stage-packages: 25 - git 26 - python-pygments 27 prepare: | 28 export GOPATH=$(dirname $SNAPCRAFT_PART_INSTALL)/go 29 export PATH=$GOPATH/bin:$PATH 30 cd $GOPATH/src/github.com/gohugoio/hugo 31 go get github.com/magefile/mage 32 mage -v vendor test 33 build: | 34 export GOPATH=$(dirname $SNAPCRAFT_PART_INSTALL)/go 35 export PATH=$GOPATH/bin:$PATH 36 [ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ] && mage hugoNoGitInfo || mage hugo 37 ./hugo version 38 ./hugo gen autocomplete --completionfile=hugo-completion 39 install: | 40 install -d $SNAPCRAFT_PART_INSTALL/bin 41 cp -a hugo $SNAPCRAFT_PART_INSTALL/bin/hugo 42 strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/hugo 43 mv hugo-completion $SNAPCRAFT_PART_INSTALL/hugo-completion 44 after: [go] 45 go: 46 source-tag: go1.10.1