2020-03-15 10:52:02 +03:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
DETECTED_OS := Windows
|
|
|
|
else
|
|
|
|
DETECTED_OS := $(shell uname)
|
|
|
|
endif
|
|
|
|
|
2020-06-30 14:35:16 +03:00
|
|
|
.PHONY: init dev build test clean
|
|
|
|
|
2020-09-04 09:33:17 +03:00
|
|
|
init: install-deps download-bins compile-dev
|
2020-06-30 14:35:16 +03:00
|
|
|
echo "Init done"
|
2020-03-15 10:52:02 +03:00
|
|
|
|
2020-06-05 22:47:30 +03:00
|
|
|
download-bins:
|
2020-06-30 14:35:16 +03:00
|
|
|
yarn download-bins
|
|
|
|
|
|
|
|
install-deps:
|
|
|
|
yarn install --frozen-lockfile
|
2020-06-05 22:47:30 +03:00
|
|
|
|
2020-06-30 14:35:16 +03:00
|
|
|
compile-dev:
|
|
|
|
yarn compile:main --cache
|
|
|
|
yarn compile:renderer --cache
|
2020-03-15 10:52:02 +03:00
|
|
|
|
2020-06-30 14:35:16 +03:00
|
|
|
dev:
|
2020-08-25 11:08:46 +03:00
|
|
|
ifeq ("$(wildcard static/build/main.js)","")
|
|
|
|
make init
|
|
|
|
endif
|
|
|
|
yarn dev
|
2020-06-30 14:35:16 +03:00
|
|
|
|
|
|
|
lint:
|
|
|
|
yarn lint
|
|
|
|
|
2020-09-01 14:28:59 +03:00
|
|
|
test: download-bins
|
2020-06-30 14:35:16 +03:00
|
|
|
yarn test
|
2020-03-15 10:52:02 +03:00
|
|
|
|
2020-06-09 13:18:24 +03:00
|
|
|
integration-linux:
|
|
|
|
yarn build:linux
|
|
|
|
yarn integration
|
|
|
|
|
|
|
|
integration-mac:
|
|
|
|
yarn build:mac
|
|
|
|
yarn integration
|
|
|
|
|
|
|
|
integration-win:
|
|
|
|
yarn build:win
|
|
|
|
yarn integration
|
|
|
|
|
2020-03-15 10:52:02 +03:00
|
|
|
test-app:
|
|
|
|
yarn test
|
|
|
|
|
2020-09-03 14:40:38 +03:00
|
|
|
build: install-deps download-bins
|
2020-03-15 10:52:02 +03:00
|
|
|
ifeq "$(DETECTED_OS)" "Windows"
|
|
|
|
yarn dist:win
|
|
|
|
else
|
|
|
|
yarn dist
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean:
|
2020-08-25 11:08:46 +03:00
|
|
|
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
|
2020-06-30 14:35:16 +03:00
|
|
|
rm -rf binaries/client/*
|
2020-03-15 10:52:02 +03:00
|
|
|
rm -rf dist/*
|
2020-08-25 11:08:46 +03:00
|
|
|
rm -rf static/build/*
|
|
|
|
endif
|