new file: projects/tlr.dev/package.yml

This commit is contained in:
Andrii Riabchenko 2024-02-19 18:58:57 +02:00 committed by Max Howell
parent 34f3ff3b26
commit 76b75bcb97

View file

@ -0,0 +1,46 @@
distributable:
url: git+https://github.com/SpectralOps/teller.git
ref: ${{version.tag}}
versions:
github: SpectralOps/teller
build:
dependencies:
go.dev: ^1.21
script:
go build $ARGS -ldflags="$LDFLAGS" .
env:
COMMIT_SHA: "$(git describe --always --abbrev=8 --dirty)"
VERSION_DATE: "$(date -u +%FT%TZ)"
ARGS:
- -trimpath
- -o={{prefix}}/bin/teller
linux:
ARGS:
- -buildmode=pie
LDFLAGS:
- -s
- -w
- -X main.version={{version}}
- -X main.commit=${COMMIT_SHA}
- -X main.date=${VERSION_DATE}
provides:
- bin/teller
test:
- |
echo 'foo: var' > test.env
- run: teller -c $FIXTURE show 2>&1 | grep 'foo'
fixture:
content: |
project: test
providers:
# this will fuse vars with the below .env file
# use if you'd like to grab secrets from outside of the project tree
dotenv:
env_sync:
path: test.env
extname: .yml
- teller version | grep {{version}}