forked from lensapp/lens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (63 loc) · 1.6 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
EXTENSIONS_DIR = ./extensions
ifeq ($(OS),Windows_NT)
DETECTED_OS := Windows
else
DETECTED_OS := $(shell uname)
endif
.PHONY: init dev build test clean
init: install-deps download-bins compile-dev
echo "Init done"
download-bins:
yarn download-bins
install-deps:
yarn install --frozen-lockfile
compile-dev:
yarn compile:main --cache
yarn compile:renderer --cache
dev:
ifeq ("$(wildcard static/build/main.js)","")
make init
endif
yarn dev
lint:
yarn lint
test: download-bins
yarn test
integration-linux: build-extension-types build-extensions
yarn build:linux
yarn integration
integration-mac: build-extension-types build-extensions
yarn build:mac
yarn integration
integration-win: build-extension-types build-extensions
yarn build:win
yarn integration
test-app:
yarn test
build: install-deps download-bins build-extensions
ifeq "$(DETECTED_OS)" "Windows"
yarn dist:win
else
yarn dist
endif
build-extensions:
$(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), $(MAKE) -C $(dir) build;)
test-extensions:
$(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), $(MAKE) -C $(dir) test;)
build-npm: build-extension-types
yarn npm:fix-package-version
build-extension-types:
yarn compile:extension-types
publish-npm: build-npm
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
cd src/extensions/npm/extensions && npm publish --access=public
clean:
ifeq "$(DETECTED_OS)" "Windows"
if exist binaries\client del /s /q binaries\client\*.*
if exist dist del /s /q dist\*.*
if exist static\build del /s /q static\build\*.*
else
rm -rf binaries/client/*
rm -rf dist/*
rm -rf static/build/*
endif