mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 17:05:07 +03:00
42 lines
1,004 B
YAML
42 lines
1,004 B
YAML
|
distributable:
|
||
|
url: https://gitlab.com/gitlab-org/cli/-/archive/v{{version}}/cli-v{{version}}.tar.gz
|
||
|
strip-components: 1
|
||
|
|
||
|
versions:
|
||
|
- 1.26.0
|
||
|
|
||
|
provides:
|
||
|
- bin/glab
|
||
|
|
||
|
build:
|
||
|
script: |
|
||
|
go mod download
|
||
|
mkdir -p "{{ prefix }}"/bin
|
||
|
go build -v -trimpath -ldflags="$LDFLAGS" -o $BUILDLOC ./cmd/glab
|
||
|
dependencies:
|
||
|
go.dev: ^1.18
|
||
|
env:
|
||
|
GO111MODULE: 'on'
|
||
|
BUILDLOC: '{{prefix}}/bin/glab'
|
||
|
LDFLAGS:
|
||
|
- -s
|
||
|
- -w
|
||
|
- -X main.version={{version}}
|
||
|
- -X main.debugMode=false
|
||
|
|
||
|
linux:
|
||
|
# or segmentation fault
|
||
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||
|
LDFLAGS:
|
||
|
- -buildmode=pie
|
||
|
|
||
|
test:
|
||
|
dependencies:
|
||
|
git-scm.org: '*'
|
||
|
script: |
|
||
|
git clone https://gitlab.com/cli-automated-testing/homebrew-testing.git
|
||
|
cd homebrew-testing
|
||
|
glab repo contributors | grep "Matt Nohr"
|
||
|
glab issue list --all | grep "This is a test issue"
|
||
|
glab --version | grep "glab version {{version}}"
|