diff --git a/Dockerfile b/Dockerfile index ce55fe6..788ce3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.0-alpine +FROM golang:1.19-alpine # cache buster -RUN echo 4 +RUN echo 4 # git is needed for "go get" below RUN apk add --no-cache git make @@ -32,3 +32,4 @@ RUN /bin/true \ && wget -O /scowl-wl/words-US-60.txt ${SOURCE_US} \ && wget -O /scowl-wl/words-GB-ise-60.txt ${SOURCE_GB_ISE} +RUN git config --global --add safe.directory "/go/src/github.com/golangci/misspell" diff --git a/Makefile b/Makefile index e64a84b..783f977 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ -CONTAINER=nickg/misspell +CONTAINER=golangci/misspell default: lint test build install: ## install misspell into GOPATH/bin go install ./cmd/misspell -build: ## build and lint misspell +build: ## build misspell go build ./cmd/misspell test: ## run all tests @@ -14,10 +14,6 @@ test: ## run all tests lint: ## run linter golangci-lint run -# real publishing is done only by travis -publish: ## test goreleaser - ./scripts/goreleaser-dryrun.sh - # the grep in line 2 is to remove misspellings in the spelling dictionary # that trigger false positives!! falsepositives: /scowl-wl @@ -42,19 +38,16 @@ clean: ## clean up time go clean ./... git gc --aggressive -ci: ## run test like travis-ci does, requires docker +ci: docker-build ## run test like travis-ci does, requires docker docker run --rm \ -v $(PWD):/go/src/github.com/golangci/misspell \ -w /go/src/github.com/golangci/misspell \ ${CONTAINER} \ - make build falsepositives + make install falsepositives docker-build: ## build a docker test image docker build -t ${CONTAINER} . -docker-pull: ## pull latest test image - docker pull ${CONTAINER} - docker-console: ## log into the test image docker run --rm -it \ -v $(PWD):/go/src/github.com/golangci/misspell \ diff --git a/goreleaser.yml b/goreleaser.yml index b4c8c09..97aa83e 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -1,8 +1,7 @@ project_name: misspell builds: - - - main: cmd/misspell/main.go + - main: cmd/misspell/main.go binary: misspell ldflags: -s -w -X main.version={{.Version}} goos: diff --git a/scripts/commit-msg.sh b/scripts/commit-msg.sh deleted file mode 100755 index 3655bd0..0000000 --- a/scripts/commit-msg.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -ex -misspell -error "$1" diff --git a/scripts/goreleaser-dryrun.sh b/scripts/goreleaser-dryrun.sh deleted file mode 100755 index 0463058..0000000 --- a/scripts/goreleaser-dryrun.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -echo "Real publishing is done by the CI" - -set -ex -echo "TAG:= $(git tag | tail -1)" -rm -rf ./dist -goreleaser --skip-publish --skip-validate