From eafd1b07cb7e617ac3a7cb45e06a4cac919263b3 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 14 Jun 2017 20:50:04 +0200 Subject: [PATCH] Add CI building Signed-off-by: Knut Ahlers --- .repo-runner.yaml | 10 ++++++++++ Makefile | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .repo-runner.yaml diff --git a/.repo-runner.yaml b/.repo-runner.yaml new file mode 100644 index 0000000..9568650 --- /dev/null +++ b/.repo-runner.yaml @@ -0,0 +1,10 @@ +--- + +image: "quay.io/luzifer/repo-runner-image" +checkout_dir: /go/src/github.com/Luzifer/vault-otp-ui + +commands: + - make ci + +environment: + CGO_ENABLED: 0 diff --git a/Makefile b/Makefile index f758374..f41f8d7 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,14 @@ +default: build + +ci: + curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh + bash golang.sh + +build: generate + go build -ldflags "-X main.version=$(shell git describe --tags || git rev-parse --short HEAD || echo dev)" + +install: generate + go install -ldflags "-X main.version=$(shell git describe --tags || git rev-parse --short HEAD || echo dev)" generate: build_js go generate