From 609710a0ebe45904ce98bbbb4290bc7818f1873d Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Thu, 24 Sep 2020 01:58:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 8 ++------ build.sh | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 build.sh diff --git a/.drone.yml b/.drone.yml index 3a1b61a..9f0a196 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,15 +4,11 @@ type: docker name: goenv steps: - - name: build1 - pull: if-not-exists - image: ghcr.io/xiaoqidun/build - commands: - - build -f build.sh -i goenv.go -o release/goenv - - name: build2 + - name: build pull: if-not-exists image: xiaoqidun/goenv commands: + - chmod +x build.sh - ./build.sh - name: upload pull: if-not-exists diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..ee504f7 --- /dev/null +++ b/build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_linux_amd64 -trimpath -ldflags '-s -w' goenv.go +GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_darwin_amd64 -trimpath -ldflags '-s -w' goenv.go +GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_windows_amd64.exe -trimpath -ldflags '-s -w' goenv.go \ No newline at end of file