pantry/projects/fly.io/package.yml

36 lines
1,013 B
YAML
Raw Normal View History

2023-04-30 02:54:25 +03:00
distributable:
url: https://github.com/superfly/flyctl/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: superfly/flyctl/releases/tags
strip: /^v/
build:
dependencies:
2023-08-15 02:21:55 +03:00
# Build fails with go 1.21.0
# https://github.com/superfly/flyctl/issues/2688
2023-08-31 22:57:51 +03:00
go.dev: ^1.21
2023-04-30 02:54:25 +03:00
env:
CGO_ENABLED: 0
LDFLAGS:
- -s
- -w
- -X github.com/superfly/flyctl/internal/buildinfo.environment=production
- -X github.com/superfly/flyctl/internal/buildinfo.buildDate=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
- -X github.com/superfly/flyctl/internal/buildinfo.version={{ version }}
- -X github.com/superfly/flyctl/internal/buildinfo.commit=tea
script: |
go build -v -ldflags="$LDFLAGS" -o "{{ prefix }}"/bin/flyctl .
cd "{{ prefix }}"/bin
ln -s flyctl fly
provides:
- bin/fly
- bin/flyctl
test: |
fly version | grep {{version}}
flyctl version | grep {{version}}
echo $(flyctl status 2>&1 || true) | grep " No access token available"