blob: 0964ec6c1c5b1cb43b28788378686a141488ab78 [file] [log] [blame]
include make/bazel.mk
testgo:
go test -test.short ./go/...
.PHONY: testjs
testjs:
cd js && $(MAKE) test
.PHONY: skolo
skolo:
cd skolo && $(MAKE) all
.PHONY: tags
tags:
-rm tags
find . -name "*.go" -print -or -name "*.js" -or -name "*.html" | xargs ctags --append
.PHONY: buildall
buildall:
go build ./...
.PHONY: update-go-bazel-files
update-go-bazel-files:
$(BAZEL) run --config=mayberemote //:gazelle -- update ./
.PHONY: update-go-bazel-deps
update-go-bazel-deps:
$(BAZEL) run --config=mayberemote //:gazelle -- update-repos -from_file=go.mod -to_macro=go_repositories.bzl%go_repositories -prune
.PHONY: gazelle
gazelle: update-go-bazel-deps update-go-bazel-files
# Run this if we need to update our JS/TS packages
.PHONY: update-npm
update-npm:
$(BAZEL) run -- @pnpm//:pnpm --dir $(PWD) install --lockfile-only
.PHONY: buildifier
buildifier:
$(BAZEL) run --config=mayberemote //:buildifier
.PHONY: gofmt
gofmt:
$(BAZEL) run --config=mayberemote //:gofmt -- -s -w .
node_modules: package-lock.json
$(BAZEL) run --config=mayberemote //:npm -- ci
# We add node_modules as a dependency because npx looks for prettier in that directory.
.PHONY: prettier
prettier: node_modules
$(BAZEL) run --config=mayberemote //:npx -- prettier --write . --ignore-unknown
.PHONY: bazel-build
bazel-build:
$(BAZEL) build //...
.PHONY: bazel-test
bazel-test:
$(BAZEL) test //...
.PHONY: bazel-test-nocache
bazel-test-nocache:
$(BAZEL) test --cache_test_results=no //...
.PHONY: bazel-build-rbe
bazel-build-rbe:
$(BAZEL) build --config=remote //...
.PHONY: bazel-test-rbe
bazel-test-rbe:
$(BAZEL) test --config=remote //...
.PHONY: bazel-test-rbe-nocache
bazel-test-rbe-nocache:
$(BAZEL) test --config=remote --cache_test_results=no //...
.PHONY: eslint
eslint:
-npx eslint --quiet --fix .
.PHONY: errcheck
errcheck:
$(BAZEL) run //:errcheck -- -ignore :Close go.skia.org/infra/...
.PHONY: mocks
mocks:
$(BAZEL) run //:mockery
include make/npm.mk