feeds.go: fixes

This commit is contained in:
Andreas Neue 2024-07-06 23:55:40 +02:00
parent fa1fe08d7f
commit 3bc16b4c5b
7 changed files with 101 additions and 15 deletions

View file

@ -7,16 +7,30 @@ vet:
go vet ./...
fmt:
go list -f '{{.Dir}}' ./... | grep -v /vendor/ | xargs -L1 gofmt -l
go fmt ./...
#go list -f '{{.Dir}}' ./... | grep -v /vendor/ | xargs -L1 gofmt -l
#test -z $$(go list -f '{{.Dir}}' ./... | grep -v /vendor/ | xargs -L1 gofmt -l)
lint:
go list ./... | grep -v /vendor/ | xargs -L1 golint -set_exit_status
build:
build: fmt
go build -v -a -o bin/flokati ./cmd/flokati
docker:
VERSIONGO=cmd/flokati/version.go
REV=$$(git rev-list HEAD --count)
BUILDDATE=$$(date)
BRANCH=$$(git rev-parse --abbrev-ref HEAD)
TAGS=.tags
docker: fmt
echo "package main" >$(VERSIONGO)
echo "" >>$(VERSIONGO)
echo "const (" >>$(VERSIONGO)
echo " Version = \"$(BRANCH)\"" >>$(VERSIONGO)
echo " Build = \"$(REV)\"" >>$(VERSIONGO)
echo " Builddate = \"$(BUILDDATE)\"" >>$(VERSIONGO)
echo ")" >>$(VERSIONGO)
echo -n "$(BRANCH)-$(REV)" >$(TAGS)
docker build -t dr.dnix.de/flokati .
docker push dr.dnix.de/flokati