Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Fix build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed May 5, 2019
1 parent e9e1b9a commit 8f2b7e6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 17 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

bin/
.docker/
gravo
/grafana-storage
seihon
*.Dockerfile
manifest.json
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
dist: xenial

language: go

go:
Expand All @@ -7,10 +9,11 @@ services:
- docker

env:
- GO111MODULE=on
# docker credentials
- secure: "MMDlT13nZPkJRlC6qXXYoxNJrwxoXFyzxJsipZhEE0YGza1kq/8spej9QroYlh5LgpJbcIOV0FtrKWF+5NYSY/dsNF/apKZkdgpemh7pDez8R6vaGCLoXvAnd5HAkyHv/uzrxUYAK9NuKBc4utZLMmsZxmY1HFd3M357WX6X6JpxxESPtMb7mdY5OZFmqnaNlde6p8zoo9oJmiG6Q0t52nhNaSY82Y2kf06e32IfgJiRwDzideLyVU1TH1YcSRXstT3m8/xPJQWDRKUNurbKeJnPJE/iga/fGNjvMaEtLcbSCE9g4AgyaJEfPgHGDFNCUQ3G7iovN6URNdk2Q8EJCaT6ZKDZAarWaF2SmUrnTWl1RjrjwnU7Yvvx4ls9b8iCEXAitXaSXqnz5M+yDKf33bO5mX1B4Skv7kPAdC4bHWtgndAOyfcLqUKbHntcYh2pGX61TBw7qD1mSVx3nItmIEvqKuP2dEmNc9nBO3lBD4CSRvNpKT1vT3S1wX25pblWvz1bV28LKuSPU5GzusaI/KJ2mv+YC2CTJ287tQd7xZSEFYaS2NT5irysT4awcJLvYXm6L1t2rC3XUAGGuBFMbTMJzRPCSyzuLStt66C0i83iLHmNIuCIsi0Yp02nvDuR+L1n5kl7NgSP7cc0bx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+25,15 @@ before_install:
- golangci-lint --version

script:
- make test
- make build
- make

before_deploy:
- curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | bash -s -- -b $GOPATH/bin
- seihon --version
- >
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
export BEFORE_DEPLOY_RUN=1;
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
deploy:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN adduser -D -g '' appuser
WORKDIR /go/src/github.com/andig/gravo

ENV GO111MODULE on
COPY go.* .
COPY go.* ./
RUN go mod download

COPY . .
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ BUILD_DATE := $(shell date -u '+%Y-%m-%d_%H:%M:%S')

default: clean checks test build

test: clean
go test -v -cover ./...

clean:
rm -rf dist/ cover.out

checks:
golangci-lint run

test: clean
go test -v -cover ./...

build: clean
@echo Version: $(VERSION) $(BUILD_DATE)
go build -v -ldflags '-X "main.version=${VERSION}" -X "main.commit=${SHA}" -X "main.date=${BUILD_DATE}"' -o gravo

publish-images:
@echo Version: $(VERSION) $(BUILD_DATE)
seihon publish --version="$(TAG_NAME)" --image-name andig/gravo --base-image-name alpine --dry-run=false
seihon publish --version="latest" --image-name andig/gravo --base-image-name alpine --dry-run=false
seihon publish --version="$(TAG_NAME)" --image-name andig/gravo --base-runtime-image alpine --dry-run=false
seihon publish --version="latest" --image-name andig/gravo --base-runtime-image alpine --dry-run=false

test-release:
goreleaser --snapshot --skip-publish --rm-dist
2 changes: 1 addition & 1 deletion tmpl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN adduser -D -g '' appuser
WORKDIR /go/src/github.com/andig/gravo

ENV GO111MODULE on
COPY go.* .
COPY go.* ./
RUN go mod download

COPY . .
Expand Down
4 changes: 3 additions & 1 deletion volkszaehler/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ func (api *client) QueryPublicEntities() []Entity {
}

// QueryData retrieves data for specified timeframe and parameters
func (api *client) QueryData(uuid string, from time.Time, to time.Time, group string, options string, tuples int) []Tuple {
func (api *client) QueryData(uuid string, from time.Time, to time.Time,
group string, options string, tuples int,
) []Tuple {
f := from.Unix()
t := to.Unix()
url := fmt.Sprintf("/data/%s.json?from=%d&to=%d", uuid, f*1000, t*1000)
Expand Down

0 comments on commit 8f2b7e6

Please sign in to comment.