This commit is contained in:
Jacob Heider 2024-05-28 12:23:41 -04:00 committed by Jacob Heider
parent 7bada74168
commit 5c9896041d

View file

@ -0,0 +1,32 @@
distributable:
url: https://github.com/maaslalani/invoice/archive/refs/tags/{{version.tag}}.tar.gz
strip-components: 1
versions:
github: maaslalani/invoice
provides:
- bin/invoice
build:
dependencies:
go.dev: ^1.20
script:
- go mod download
- go build -v -trimpath -ldflags="$GO_LDFLAGS" -o '{{prefix}}/bin/invoice' .
env:
GO_LDFLAGS:
- -s
- -w
linux:
# or segmentation fault
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
GO_LDFLAGS:
- -buildmode=pie
test:
- invoice generate --from "Dream, Inc." --to "Imagine, Inc."
--item "Rubber Duck" --quantity 2 --rate 25
--tax 0.13 --discount 0.15
--note "For debugging purposes"
- test -s invoice.pdf