2024-02-01 20:44:24 +03:00
|
|
|
distributable:
|
|
|
|
url: git+https://github.com/coder/coder.git
|
|
|
|
ref: ${{version.tag}}
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: coder/coder
|
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
2024-02-07 18:23:26 +03:00
|
|
|
# doesn't work with 1.22 yet:
|
|
|
|
# https://github.com/coder/coder/issues/11342
|
|
|
|
go.dev: ~1.21
|
2024-02-01 20:44:24 +03:00
|
|
|
script: go build $ARGS -ldflags="$LD_FLAGS" ./cmd/coder
|
|
|
|
env:
|
|
|
|
ARGS:
|
|
|
|
- -trimpath
|
|
|
|
- -o={{prefix}}/bin/coder
|
|
|
|
- -tags slim
|
|
|
|
LD_FLAGS:
|
|
|
|
- -s
|
|
|
|
- -w
|
|
|
|
- -X github.com/coder/coder/v2/buildinfo.tag={{version}}
|
|
|
|
- -X github.com/coder/coder/v2/buildinfo.agpl=true
|
|
|
|
linux:
|
|
|
|
LD_FLAGS:
|
|
|
|
- -buildmode=pie
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/coder
|
|
|
|
|
|
|
|
test:
|
|
|
|
- coder version | grep {{version}}
|
|
|
|
- coder netcheck 2>out.log || true
|
2024-02-07 18:23:26 +03:00
|
|
|
- cat out.log | grep 'You are not logged in'
|