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