example using if: rather than semverator

This commit is contained in:
Max Howell 2023-06-15 09:28:12 -04:00
parent 89f8e4d391
commit 9d700f7ab6
No known key found for this signature in database
GPG key ID: 741BB84EF5BB9EEC

View file

@ -13,14 +13,18 @@ build:
go.dev: ^1.18 go.dev: ^1.18
gnu.org/patch: '*' gnu.org/patch: '*'
crates.io/semverator: ^0 crates.io/semverator: ^0
script: | script:
if semverator satisfies '<3.25.0' {{ version }}; then # Add go.mod on older versions
# Add go.mod on older versions - run: patch -p1 <props/patch-go-modules.diff
patch -p1 <props/patch-go-modules.diff if: <3.25
fi
mkdir -p "{{ prefix }}"/bin - mkdir -p {{prefix}}/bin
go build -v -ldflags="$LDFLAGS" -o "{{ prefix }}"/bin/go-bindata ./go-bindata
- go build
-v
-ldflags="$LDFLAGS"
-o {{prefix}}/bin/go-bindata
./go-bindata
env: env:
LDFLAGS: LDFLAGS: