From c6a761865162ec630d291552cc6f8c22944c0cb5 Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Mon, 26 Oct 2020 13:42:07 +0400 Subject: [PATCH] ci config --- .gitlab-ci.yml | 18 ++++++++++++++++++ Makefile | 12 ++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Makefile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..1443add --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +image: golang:1.15 + +cache: + paths: + - /apt-cache + - /go/src/github.com + - /go/src/golang.org + - /go/src/google.golang.org + - /go/src/gopkg.in + - /go/src/gitlab.lehouerou.net + +stages: + - build + +build: + stage: build + script: + - make \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9e3d55d --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +PROJECT_NAME := "dnsupdater" +PKG := "gitlab.lehouerou.net/laurent/$(PROJECT_NAME)" +PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/) +GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go) + +all: build + +dep: ## Get the dependencies + @go get -v -d ./... + +build: dep ## Build the binary file + @go build -i -v $(PKG) \ No newline at end of file