2022-11-19 06:36:49 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/cli/cli/archive/refs/tags/v{{version}}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: cli/cli/tags
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/gh
|
|
|
|
|
|
|
|
build:
|
|
|
|
script: |
|
|
|
|
make bin/gh
|
|
|
|
mkdir -p "{{prefix}}"/bin
|
|
|
|
mv bin/gh "{{prefix}}"/bin
|
|
|
|
|
|
|
|
# cleanup - gocache for some reason is not writeable
|
|
|
|
chmod -R u+w "$GOPATH" "$GOCACHE"
|
|
|
|
rm -rf "$GOPATH" "$GOCACHE"
|
|
|
|
dependencies:
|
|
|
|
go.dev: ^1.18
|
|
|
|
tea.xyz/gx/make: '*'
|
2023-01-05 23:57:23 +03:00
|
|
|
tea.xyz/gx/cc: c99 # for cgo
|
2022-11-19 06:36:49 +03:00
|
|
|
env:
|
|
|
|
GOPATH: ${{prefix}}/gopath
|
|
|
|
GOCACHE: ${{prefix}}/gocache
|
|
|
|
GH_VERSION: ${{version}}
|
|
|
|
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:
|
|
|
|
gh --version
|