lint fixes

This commit is contained in:
Aine
2023-10-03 00:03:29 +03:00
parent ef221038f7
commit 0d0dcf20b9
18 changed files with 196 additions and 152 deletions

View File

@@ -4,12 +4,6 @@ project := file_name(repo)
gitlab_image := "registry." + repo + ":" + tag
etke_image := replace(gitlab_image, "gitlab.com", "etke.cc")
try:
@echo {{ project }}
@echo {{ repo }}
@echo {{ gitlab_image }}
@echo {{ etke_image }}
# show help by default
default:
@just --list --justfile {{ justfile() }}
@@ -22,7 +16,7 @@ update:
go mod vendor
# run linter
lint: try
lint:
golangci-lint run ./...
# automatically fix liter issues
@@ -30,7 +24,7 @@ lintfix:
golangci-lint run --fix ./...
# run unit tests
test: try
test:
@go test -cover -coverprofile=cover.out -coverpkg=./... -covermode=set ./...
@go tool cover -func=cover.out
-@rm -f cover.out
@@ -44,10 +38,10 @@ build:
go build -v -o {{ project }} ./cmd
# docker login
login: try
login:
@docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# docker build
docker: try
docker:
docker buildx create --use
docker buildx build --pull --platform linux/arm64/v8,linux/amd64 --push -t {{ gitlab_image }} -t {{ etke_image }} .