| name: cloudmonkey |
| version: git |
| summary: Apache CloudStack CLI |
| description: | |
| An CLI and interactive shell that simplifies configuration and management of |
| Apache CloudStack, the opensource IAAS cloud computing platform. |
| |
| base: core18 |
| license: Apache-2.0 |
| grade: stable |
| confinement: strict |
| |
| apps: |
| cloudmonkey: |
| command: bin/cmk |
| plugs: |
| - home |
| - network |
| |
| parts: |
| cloudmonkey: |
| source: . |
| source-type: git |
| source-tag: 6.0.0 |
| plugin: go |
| go-importpath: github.com/apache/cloudstack-cloudmonkey |
| build-packages: |
| - gcc |
| - make |
| - file |
| override-build: | |
| set -eu |
| go version |
| 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 |
| file cmk |
| chmod +x cmk |
| ./cmk -v |
| mkdir -p $SNAPCRAFT_PART_INSTALL/bin |
| mv cmk $SNAPCRAFT_PART_INSTALL/bin/ |
| strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/cmk |