2020-10-19 11:41:07 +03:00
|
|
|
EXTENSIONS_DIR = ./extensions
|
|
|
|
|
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:
|
2020-11-13 20:32:15 +03:00
|
|
|
yarn install --frozen-lockfile --verbose
|
|
|
|
yarn check --verify-tree --integrity
|
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-11-04 13:49:37 +03:00
|
|
|
integration-linux: build-extension-types build-extensions
|
2020-06-09 13:18:24 +03:00
|
|
|
yarn build:linux
|
|
|
|
yarn integration
|
|
|
|
|
2020-11-04 13:49:37 +03:00
|
|
|
integration-mac: build-extension-types build-extensions
|
2020-06-09 13:18:24 +03:00
|
|
|
yarn build:mac
|
|
|
|
yarn integration
|
|
|
|
|
2020-11-04 13:49:37 +03:00
|
|
|
integration-win: build-extension-types build-extensions
|
2020-06-09 13:18:24 +03:00
|
|
|
yarn build:win
|
|
|
|
yarn integration
|
|
|
|
|
2020-03-15 10:52:02 +03:00
|
|
|
test-app:
|
|
|
|
yarn test
|
|
|
|
|
2020-10-19 11:41:07 +03:00
|
|
|
build: install-deps download-bins build-extensions
|
2020-03-15 10:52:02 +03:00
|
|
|
ifeq "$(DETECTED_OS)" "Windows"
|
|
|
|
yarn dist:win
|
|
|
|
else
|
|
|
|
yarn dist
|
|
|
|
endif
|
|
|
|
|
2020-10-19 11:41:07 +03:00
|
|
|
build-extensions:
|
2020-11-13 20:32:15 +03:00
|
|
|
$(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), (cd $(dir) && npm install && npm run build || exit $?);)
|
2020-10-27 14:02:31 +03:00
|
|
|
|
2020-11-04 13:49:37 +03:00
|
|
|
test-extensions:
|
2020-11-13 20:32:15 +03:00
|
|
|
$(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), (cd $(dir) && npm install --dev && npm run test || exit $?);)
|
2020-11-04 13:49:37 +03:00
|
|
|
|
|
|
|
build-npm: build-extension-types
|
2020-10-27 14:02:31 +03:00
|
|
|
yarn npm:fix-package-version
|
|
|
|
|
2020-11-04 13:49:37 +03:00
|
|
|
build-extension-types:
|
|
|
|
yarn compile:extension-types
|
|
|
|
|
2020-10-27 14:02:31 +03:00
|
|
|
publish-npm: build-npm
|
2020-10-27 22:54:08 +03:00
|
|
|
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
2020-10-27 18:06:56 +03:00
|
|
|
cd src/extensions/npm/extensions && npm publish --access=public
|
2020-10-19 11:41:07 +03:00
|
|
|
|
2020-03-15 10:52:02 +03:00
|
|
|
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/*
|
2020-10-19 11:41:07 +03:00
|
|
|
endif
|