1
0
Fork 0

Add build scripts and cleanup

master
Ambrose Chua 2021-01-24 09:38:16 +08:00
parent f0707f5bfd
commit 47ebb3f376
3 changed files with 11 additions and 40 deletions

View File

@ -1,38 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: test
image: golang:1.14-alpine
pull: true
environment:
CGO_ENABLED: 0
GOOS: linux
GOARCH: amd64
commands:
- cd coredns && go test
- name: build
image: golang:1.14-alpine
pull: true
environment:
CGO_ENABLED: 0
GOOS: linux
GOARCH: amd64
commands:
- cd coredns && go build
when:
event:
- tag
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.makerforce.io
api_key:
from_secret: gitea_token
files: coredns/coredns
when:
event:
- tag
# vim: ts=2:sw=2

3
.gitignore vendored
View File

@ -1,2 +1 @@
coredns/coredns_*
coredns/gitea_token
coredns/build/

10
coredns/Makefile Normal file
View File

@ -0,0 +1,10 @@
GO:=go
NAME:=coredns
.PHONY: build
build:
$(RM) -rf build && mkdir build
GOOS=darwin GOARCH=amd64 $(GO) build -o build/coredns_darwin_amd64
GOOS=windows GOARCH=amd64 $(GO) build -o build/coredns_windows_amd64.exe
GOOS=linux GOARCH=amd64 $(GO) build -o build/coredns_linux_amd64
GOOS=linux GOARCH=arm64 $(GO) build -o build/coredns_linux_arm64