forked from openshift/sippy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (41 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
export PATH := ${HOME}/go/bin:/go/bin:${PATH}
DOCKER := $(or $(DOCKER),podman)
DEPS = npm go
CHECK := $(foreach dep,$(DEPS),\
$(if $(shell which $(dep)),"$(dep) found",$(error "Missing $(dep) in PATH")))
all: test build
build: builddir clean npm frontend sippy sippy-daemon
verify: lint
builddir:
mkdir -p sippy-ng/build
touch sippy-ng/build/index.js
frontend:
cd sippy-ng; npm run build
sippy: builddir
go build -mod=vendor ./cmd/sippy/...
sippy-daemon: builddir
go build -mod=vendor ./cmd/sippy-daemon/...
test: builddir npm
go test -v ./pkg/...
LANG=en_US.utf-8 LC_ALL=en_US.utf-8 cd sippy-ng; CI=true npm test -- --coverage --passWithNoTests
lint: builddir npm
./hack/go-lint.sh run ./...
cd sippy-ng; npx eslint .
# See https://github.com/facebook/create-react-app/issues/11174 about
# why we only audit production deps:
cd sippy-ng; npm audit --production
npm:
# For debugging
npm --version
npm config set fetch-retry-mintimeout 20000
npm config set fetch-retry-maxtimeout 120000
cd sippy-ng; npm install --no-audit
clean:
rm -f sippy
rm -f sippy-daemon
rm -rf sippy-ng/build
rm -rf sippy-ng/node_modules
e2e:
./scripts/e2e.sh
images:
$(DOCKER) build .