2024-01-17 00:48:02 +03:00
|
|
|
distributable:
|
|
|
|
url: git+https://github.com/canonical/pebble
|
|
|
|
ref: v{{version.raw}}
|
|
|
|
|
|
|
|
display-name: canonical/pebble
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: canonical/pebble
|
|
|
|
strip:
|
|
|
|
- /^v/
|
|
|
|
|
|
|
|
platforms:
|
2024-04-03 21:02:57 +03:00
|
|
|
# not compiling presently
|
|
|
|
# looks like canonical's fork of go-flags (several years old) doesn't support unix.Prctl properly on darwin
|
|
|
|
# - darwin
|
2024-01-17 00:48:02 +03:00
|
|
|
- linux
|
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
go.dev: '*'
|
|
|
|
git-scm.org: '*'
|
|
|
|
gnu.org/sed: '*'
|
|
|
|
cmake.org: ^3
|
|
|
|
env:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
LDFLAGS:
|
2024-04-03 21:02:57 +03:00
|
|
|
- -w
|
|
|
|
- -s
|
2024-01-17 00:48:02 +03:00
|
|
|
linux:
|
|
|
|
LDFLAGS:
|
2024-04-03 21:02:57 +03:00
|
|
|
- -buildmode=pie
|
2024-01-17 00:48:02 +03:00
|
|
|
script:
|
2024-04-03 21:02:57 +03:00
|
|
|
- go generate ./cmd
|
|
|
|
- run: sed -i 's/Version = ".*"/Version = "v{{version}}"/' version_generated.go
|
|
|
|
working-directory: cmd
|
|
|
|
if: <1.2
|
|
|
|
- go build -v -ldflags="${LDFLAGS}" -o "{{ prefix }}/bin/pebble" --trimpath ./cmd/pebble
|
2024-01-17 00:48:02 +03:00
|
|
|
|
|
|
|
provides:
|
2024-04-03 21:02:57 +03:00
|
|
|
- bin/pebble
|
2024-01-17 00:48:02 +03:00
|
|
|
|
2024-04-03 21:02:57 +03:00
|
|
|
test:
|
|
|
|
- run: pebble version | grep 'client v{{version}}'
|
|
|
|
if: <1.2
|
|
|
|
- run: test "$(pebble version --client)" = v{{version}}
|
|
|
|
if: '>=1.2'
|