Skip to content

Commit

Permalink
all: fix shell for windows, improve go-lint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Dec 24, 2020
1 parent d695285 commit 2d38b81
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,27 @@ deps: js-deps go-deps
lint: js-lint go-lint
test: js-test go-test

build-docker: ; $(ENV) $(SHELL) ./scripts/build-docker.sh
# Here and below, keep $(SHELL) in quotes, because on Windows this will
# expand to something like "C:/Program Files/Git/usr/bin/sh.exe".
build-docker: ; $(ENV) "$(SHELL)" ./scripts/build-docker.sh

build-release: deps go-gen
$(ENV) $(SHELL) ./scripts/build-release.sh
$(ENV) "$(SHELL)" ./scripts/build-release.sh

clean: ; $(ENV) $(SHELL) ./scripts/clean.sh
clean: ; $(ENV) "$(SHELL)" ./scripts/clean.sh
init: ; git config core.hooksPath ./.githooks

js-build: ; $(NPM) $(NPM_FLAGS) run build-prod
js-deps: ; $(NPM) $(NPM_FLAGS) ci
js-lint: ; $(NPM) $(NPM_FLAGS) run lint
js-test: ; $(NPM) $(NPM_FLAGS) run test

go-build: ; $(ENV) $(SHELL) ./scripts/go-build.sh
go-deps: ; $(ENV) $(SHELL) ./scripts/go-deps.sh
go-build: ; $(ENV) "$(SHELL)" ./scripts/go-build.sh
go-deps: ; $(ENV) "$(SHELL)" ./scripts/go-deps.sh
go-gen: ; $(ENV) $(GO) generate ./...
go-lint: ; $(ENV) $(SHELL) ./scripts/go-lint.sh
go-test: ; $(ENV) $(SHELL) ./scripts/go-test.sh
go-tools: ; $(ENV) $(SHELL) ./scripts/go-tools.sh
go-lint: ; $(ENV) "$(SHELL)" ./scripts/go-lint.sh
go-test: ; $(ENV) "$(SHELL)" ./scripts/go-test.sh
go-tools: ; $(ENV) "$(SHELL)" ./scripts/go-tools.sh

# TODO(a.garipov): Remove the legacy targets once the build
# infrastructure stops using them.
Expand Down
3 changes: 2 additions & 1 deletion scripts/go-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ ineffassign .

unparam ./...

git ls-files -- '*.go' '*.md' '*.yaml' '*.yml' | xargs misspell --error
git ls-files -- '*.go' '*.md' '*.yaml' '*.yml' 'Makefile'\
| xargs misspell --error

looppointer ./...

Expand Down

0 comments on commit 2d38b81

Please sign in to comment.