mirror of
https://github.com/int128/kubelogin.git
synced 2026-02-14 16:39:51 +00:00
Set CGO_ENABLED=0 for static link (#198)
This commit is contained in:
@@ -4,6 +4,8 @@ jobs:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.3
|
||||
steps:
|
||||
- run: |
|
||||
sudo apt install -y file
|
||||
- run: |
|
||||
mkdir -p ~/bin
|
||||
echo 'export PATH="$HOME/bin:$PATH"' >> $BASH_ENV
|
||||
@@ -22,6 +24,10 @@ jobs:
|
||||
- run: bash <(curl -s https://codecov.io/bash)
|
||||
- run: make run
|
||||
- run: make dist
|
||||
- run: |
|
||||
unzip dist/gh/kubelogin_linux_amd64.zip -d /tmp
|
||||
file /tmp/kubelogin
|
||||
/tmp/kubelogin --help
|
||||
- run: |
|
||||
if [ "$CIRCLE_TAG" ]; then
|
||||
make release
|
||||
|
||||
2
Makefile
2
Makefile
@@ -22,7 +22,7 @@ run: $(TARGET_PLUGIN)
|
||||
|
||||
dist:
|
||||
# make the zip files for GitHub Releases
|
||||
VERSION=$(CIRCLE_TAG) goxzst -d dist/gh/ -i "LICENSE" -o "$(TARGET)" -t "kubelogin.rb oidc-login.yaml" -- -ldflags "$(LDFLAGS)"
|
||||
VERSION=$(CIRCLE_TAG) CGO_ENABLED=0 goxzst -d dist/gh/ -i "LICENSE" -o "$(TARGET)" -t "kubelogin.rb oidc-login.yaml" -- -ldflags "$(LDFLAGS)"
|
||||
zipinfo dist/gh/kubelogin_linux_amd64.zip
|
||||
# make the Homebrew formula
|
||||
mv dist/gh/kubelogin.rb dist/
|
||||
|
||||
Reference in New Issue
Block a user