-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (36 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
os_type :=
chrome_os_type :=
ifeq ($(OS),Windows_NT)
os_type = UNSUPPORTED
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
os_type = linux
chrome_os_type = linux
endif
ifeq ($(UNAME_S),Darwin)
os_type = macos
chrome_os_type = mac
endif
endif
install: dist uninstall
sudo rsync -av dist/ /usr/local/bin/
show-os:
echo ${os_type}
dist: test
npx pkg -t "node14-${os_type}" release/jira-release.js --out-path dist/
rsync -av "node_modules/puppeteer/.local-chromium/$$(ls -1 node_modules/puppeteer/.local-chromium/)/chrome-${chrome_os_type}/" dist/jira-cli-tools-chromium/
package: clean test
npx pkg -t node14-${os_type}-x64 release/jira-release.js --out-path dist/
rsync -av "node_modules/puppeteer/.local-chromium/$$(ls -1 node_modules/puppeteer/.local-chromium/)/chrome-${chrome_os_type}/" dist/jira-cli-tools-chromium/
mkdir -p dist/usr/local/bin/
mv dist/jira-cli-tools-chromium/ dist/usr/local/bin/
mv dist/jira-release dist/usr/local/bin/
cd dist && tar -cvzf jira-cli-tools-${os_type}-x64.tar.gz usr/local/bin
uninstall:
sudo rm -vf /usr/local/bin/jira-release
sudo rm -vrf /usr/local/bin/jira-cli-tools-chromium/
test:
npm test
clean:
rm -rf dist/