From ea1913abe938db547a7825269779a8c4bc17b9b6 Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sat, 23 Sep 2017 15:40:15 +0200 Subject: [PATCH] Adding drone --- .drone.yml | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + main.go | 2 +- 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ea41434 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,109 @@ +workspace: + base: /go + path: src/github.com/JonasFranzDEV/drone-crowdin + +pipeline: + test: + image: golang:1.9 + pull: true + commands: + - go vet + - go test -cover -coverprofile=coverage.out + + build_linux_amd64: + image: golang:1.9 + pull: true + group: build + environment: + - GOOS=linux + - GOARCH=amd64 + - CGO_ENABLED=0 + commands: + - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-crowdin + + build_linux_arm64: + image: golang:1.9 + pull: true + group: build + environment: + - GOOS=linux + - GOARCH=arm64 + - CGO_ENABLED=0 + commands: + - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-crowdin + + build_linux_arm: + image: golang:1.9 + pull: true + group: build + environment: + - GOOS=linux + - GOARCH=arm + - CGO_ENABLED=0 + - GOARM=7 + commands: + - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-crowdin + + # build_windows_amd64: + # image: golang:1.9-nanoserver + # pull: true + # group: build + # environment: + # - GOOS=windows + # - GOARCH=amd64 + # - CGO_ENABLED=0 + # commands: + # - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-crowdin + + publish_linux_amd64: + image: plugins/docker:17.05 + pull: true + repo: plugins/webhook + tags: [ latest, 1.0.0, 1.0, 1 ] + secrets: [ docker_username, docker_password ] + dockerfile: Dockerfile + when: + branch: master + event: push + + publish_linux_arm64: + image: plugins/docker:17.05 + pull: true + repo: plugins/webhook + tags: [ linux-arm64 ] + secrets: [ docker_username, docker_password ] + dockerfile: Dockerfile.arm64 + when: + branch: master + event: push + + publish_linux_arm: + image: plugins/docker:17.05 + pull: true + repo: plugins/webhook + tags: [ linux-arm ] + secrets: [ docker_username, docker_password ] + dockerfile: Dockerfile.arm + when: + branch: master + event: push + + # publish_windows_amd64: + # image: plugins/docker:17.05 + # pull: true + # repo: plugins/webhook + # tags: [ windows-amd64 ] + # secrets: [ docker_username, docker_password ] + # dockerfile: Dockerfile.windows + # when: + # branch: master + # event: push + + microbadger: + image: plugins/webhook:1 + pull: true + secrets: [ webhook_url ] + when: + branch: master + event: push + status: [ success ] \ No newline at end of file diff --git a/README.md b/README.md index ddda38a..f399361 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Go Doc](https://godoc.org/github.com/JonasFranzDEV/drone-crowdin?status.svg)](http://godoc.org/github.com//JonasFranzDEV/drone-crowdin) [![Go Report](https://goreportcard.com/badge/github.com/JonasFranzDEV/drone-crowdin)](https://goreportcard.com/report/github.com//JonasFranzDEV/drone-crowdin) +[![Build Status](https://docker.jonasfranz.software/api/badges/JonasFranzDEV/drone-crowdin/status.svg)](https://docker.jonasfranz.software/JonasFranzDEV/drone-crowdin) Drone plugin to update translation files at Crowdin. For the usage information and a listing of the available options please take a look at [the docs](DOCS.md). diff --git a/main.go b/main.go index d4b4a7d..5fe9d3c 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( ) var build = "0" //build number is set on compile time -var version = "0.1.0" +var version = "1.0.0" func main() { app := cli.NewApp()