Skip to content

Commit

Permalink
Stick to standard project layout (#7)
Browse files Browse the repository at this point in the history
* re-structure things

* Update .travis.yml

* typo fix

* bump alpine
  • Loading branch information
Hermsi1337 authored Oct 12, 2020
1 parent 863dc6b commit 93095cc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 20 deletions.
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ os: linux
dist: bionic

go:
- '1.14'
- '1.15'

services:
- docker
Expand All @@ -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
condition: $TRAVIS_OS_NAME = linux
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand All @@ -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
docker-compose --file example/docker-compose/postgresql.yml down -v --remove-orphans
9 changes: 1 addition & 8 deletions .golangci.yml → build/ci/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
- dist/
File renamed without changes.
2 changes: 1 addition & 1 deletion build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.11
FROM alpine:3.12

LABEL maintainer="Mittwald CM Service <https://github.com/mittwald>"

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mittwald/brudi

go 1.14
go 1.15

require (
github.com/fsnotify/fsnotify v1.4.8 // indirect
Expand Down

0 comments on commit 93095cc

Please sign in to comment.