Skip to content

Commit 8eae8f5

Browse files
committed
snapcraft fixes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 9857760 commit 8eae8f5

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

snap/snapcraft.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ summary: Apache CloudStack CLI
44
description: |
55
An CLI and interactive shell that simplifies configuration and management of
66
Apache CloudStack, the opensource IAAS cloud computing platform.
7+
8+
base: core18
79
license: Apache-2.0
810
grade: stable
911
confinement: strict
@@ -16,11 +18,8 @@ apps:
1618
- network
1719

1820
parts:
19-
go:
20-
source-tag: go1.12.1
2121
cloudmonkey:
22-
after: [go]
23-
source: https://github.com/apache/cloudstack-cloudmonkey
22+
source: .
2423
source-type: git
2524
source-tag: 6.0.0
2625
plugin: go
@@ -32,10 +31,10 @@ parts:
3231
override-build: |
3332
set -eu
3433
go version
35-
GIT_SHA=$(git rev-parse --short HEAD)
36-
DATE=$(date +%FT%T%z)
37-
go build -mod=vendor -ldflags='-s -w -X main.GitSHA=$(GIT_SHA) -X main.BuildDate=$(DATE)' -o cmk cmk.go
34+
go build -mod=vendor -ldflags="-s -w -X main.GitSHA=$(git rev-parse --short HEAD) -X main.BuildDate=$(date +%FT%T%z)" -o cmk cmk.go
3835
file cmk
36+
chmod +x cmk
37+
./cmk -v
3938
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
4039
mv cmk $SNAPCRAFT_PART_INSTALL/bin/
4140
strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/cmk

0 commit comments

Comments
 (0)