From 42435e892684ea495ba2f06def3b515833e500b1 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Sat, 29 Apr 2023 16:54:25 -0700 Subject: [PATCH] +fly.io --- projects/fly.io/package.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 projects/fly.io/package.yml diff --git a/projects/fly.io/package.yml b/projects/fly.io/package.yml new file mode 100644 index 00000000..1a727be1 --- /dev/null +++ b/projects/fly.io/package.yml @@ -0,0 +1,33 @@ +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: + go.dev: ^1.20 + 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"