update snapcraft.yaml

This commit is contained in:
ginuerzh 2019-12-19 14:25:08 +08:00
parent 84752d33d7
commit 5414768920

View File

@ -19,20 +19,20 @@ parts:
source-branch: '2.8' source-branch: '2.8'
build-packages: build-packages:
- build-essential - build-essential
build-environment:
- GO111MODULE: 'on'
override-build: | override-build: |
set -ex set -ex
echo "Starting override-build:" echo "Starting override-build:"
pwd pwd
cd $SNAPCRAFT_PART_BUILD cd $SNAPCRAFT_PART_BUILD
GO111MODULE=on go build GO111MODULE=on CGO_ENABLED=0 go build --ldflags="-s -w"
./gost -V ./gost -V
echo "Installing to ${SNAPCRAFT_PART_INSTALL}..." echo "Installing to ${SNAPCRAFT_PART_INSTALL}..."
install -d $SNAPCRAFT_PART_INSTALL/bin install -d $SNAPCRAFT_PART_INSTALL/bin
cp -v gost $SNAPCRAFT_PART_INSTALL/bin/ cp -v gost $SNAPCRAFT_PART_INSTALL/bin/
echo "Override-build done!"
apps: apps:
gost: gost:
command: bin/gost command: bin/gost