mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 00:22:09 -05:00
snap: Add bash completion
This commit is contained in:
parent
294c0f8001
commit
874159b543
1 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,7 @@ grade: devel # "devel" or "stable"
|
||||||
apps:
|
apps:
|
||||||
hugo:
|
hugo:
|
||||||
command: bin/hugo
|
command: bin/hugo
|
||||||
|
completer: hugo-completion
|
||||||
plugs: [home, network-bind, removable-media]
|
plugs: [home, network-bind, removable-media]
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
|
@ -34,10 +35,12 @@ parts:
|
||||||
export PATH=$GOPATH/bin:$PATH
|
export PATH=$GOPATH/bin:$PATH
|
||||||
[ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ] && mage hugoNoGitInfo || mage hugo
|
[ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ] && mage hugoNoGitInfo || mage hugo
|
||||||
./hugo version
|
./hugo version
|
||||||
|
./hugo gen autocomplete --completionfile=hugo-completion
|
||||||
install: |
|
install: |
|
||||||
install -d $SNAPCRAFT_PART_INSTALL/bin
|
install -d $SNAPCRAFT_PART_INSTALL/bin
|
||||||
cp -a hugo $SNAPCRAFT_PART_INSTALL/bin/hugo
|
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
|
||||||
|
mv hugo-completion $SNAPCRAFT_PART_INSTALL/hugo-completion
|
||||||
after: [go]
|
after: [go]
|
||||||
go:
|
go:
|
||||||
source-tag: go1.10
|
source-tag: go1.10
|
||||||
|
|
Loading…
Reference in a new issue