diff --git a/.travis.yml b/.travis.yml index 002963c..ed396a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ os: linux dist: bionic go: - - '1.14' + - '1.15' services: - docker @@ -22,24 +22,25 @@ env: global: - GO111MODULE=on - CGO_ENABLED=0 - - GO_VERSION=1.14 + - GO_VERSION=1.15 + - GORELEASER_VERSION=v0.144.0 script: - - curl -sL https://git.io/goreleaser | bash -s -- --snapshot --skip-publish --rm-dist + - curl -sL https://git.io/goreleaser | VERSION=${GORELEASER_VERSION} bash -s -- --snapshot --skip-publish --rm-dist before_deploy: - docker login -u "${DOCKER_LOGIN_USERNAME}" -p "${DOCKER_LOGIN_PASSWORD}" quay.io deploy: - provider: script cleanup: false - script: curl -sL https://git.io/goreleaser | bash -s -- --snapshot --skip-publish --rm-dist && docker push "quay.io/mittwald/brudi:latest" + script: curl -sL https://git.io/goreleaser | VERSION=${GORELEASER_VERSION} bash -s -- --config build/ci/.goreleaser.yml --snapshot --skip-publish --rm-dist && docker push "quay.io/mittwald/brudi:latest" on: tags: false branch: master condition: $TRAVIS_OS_NAME = linux - provider: script cleanup: false - script: curl -sL https://git.io/goreleaser | bash -s -- --rm-dist + script: curl -sL https://git.io/goreleaser | VERSION=${GORELEASER_VERSION} bash -s -- --config build/ci/.goreleaser.yml --rm-dist on: tags: true - condition: $TRAVIS_OS_NAME = linux \ No newline at end of file + condition: $TRAVIS_OS_NAME = linux diff --git a/Makefile b/Makefile index c5976d4..1599cea 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ BINARY_NAME = brudi COMMIT_HASH = $(shell git rev-parse --verify HEAD) CURDIR = $(shell pwd) +GOLANGCI_LINT_VER = v1.23 .PHONY: build @@ -25,13 +26,13 @@ test: go test -v ./... lintpull: - docker pull golangci/golangci-lint + docker pull golangci/golangci-lint:$(GOLANGCI_LINT_VER) lint: lintpull - docker run --rm -v $(CURDIR):/app -w /app golangci/golangci-lint golangci-lint run -v + docker run --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:$(GOLANGCI_LINT_VER) golangci-lint -c build/ci/.golangci.yml run -v lintfix: lintpull - docker run --rm -v $(CURDIR):/app -w /app golangci/golangci-lint golangci-lint run -v --fix + docker run --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:$(GOLANGCI_LINT_VER) golangci-lint -c build/ci/.golangci.yml run -v --fix goreleaser: curl -sL https://git.io/goreleaser | bash -s -- --snapshot --skip-publish --rm-dist @@ -55,4 +56,4 @@ upTestPostgres: downTestPostgres docker-compose --file example/docker-compose/postgresql.yml up -d downTestPostgres: - docker-compose --file example/docker-compose/postgresql.yml down -v --remove-orphans \ No newline at end of file + docker-compose --file example/docker-compose/postgresql.yml down -v --remove-orphans diff --git a/.golangci.yml b/build/ci/.golangci.yml similarity index 81% rename from .golangci.yml rename to build/ci/.golangci.yml index bb5d0f6..134e928 100644 --- a/.golangci.yml +++ b/build/ci/.golangci.yml @@ -79,11 +79,4 @@ run: skip-dirs: - example/ - .github/ - - dist/ - -# golangci.com configuration -# https://github.com/golangci/golangci/wiki/Configuration -service: - golangci-lint-version: 1.23.x # use the fixed version to not introduce new linters unexpectedly - prepare: [] - # - echo "here I can run custom commands, but no preparation needed for this repo" \ No newline at end of file + - dist/ \ No newline at end of file diff --git a/.goreleaser.yml b/build/ci/.goreleaser.yml similarity index 100% rename from .goreleaser.yml rename to build/ci/.goreleaser.yml diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index b606f31..14c48de 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.11 +FROM alpine:3.12 LABEL maintainer="Mittwald CM Service " diff --git a/go.mod b/go.mod index 71fabf1..8b9b0ef 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/mittwald/brudi -go 1.14 +go 1.15 require ( github.com/fsnotify/fsnotify v1.4.8 // indirect