mirror of
https://github.com/ivabus/pantry
synced 2024-11-15 04:55:08 +03:00
32 lines
733 B
YAML
32 lines
733 B
YAML
distributable:
|
|
url: https://github.com/deepmap/oapi-codegen/archive/refs/tags/v{{version}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: deepmap/oapi-codegen
|
|
strip: /^v/
|
|
|
|
build:
|
|
dependencies:
|
|
go.dev: ^1.21
|
|
env:
|
|
CGO_ENABLED: 0
|
|
LDFLAGS:
|
|
- -extldflags=-static
|
|
- -w
|
|
- -s
|
|
- -X=main.noVCSVersionOverride=v{{version}}
|
|
script: |
|
|
go mod download
|
|
go build -v -ldflags="$LDFLAGS" -o oapi-codegen ./cmd/oapi-codegen
|
|
mkdir -p "{{ prefix }}"/bin
|
|
mv oapi-codegen "{{ prefix }}"/bin
|
|
|
|
provides:
|
|
- bin/oapi-codegen
|
|
|
|
test:
|
|
script: |
|
|
oapi-codegen -version | grep v{{version}}
|
|
oapi-codegen -package petstore petstore-expanded.yml > petstore.gen.go
|
|
test -f petstore.gen.go
|