This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathMakefile
64 lines (50 loc) · 1.92 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
DIST_DIR=dist
VERSION=1.24.0
DROPBOX_DIR=~/Dropbox/projects/binaries
RELEASE_FILES=$(shell ls --quoting-style=shell-escape-always dist/Todoist*) dist/todoist-linux.zip
.PHONY: env
env:
@npm install && cd src && npm install && echo -e "\nAll development dependencies have been installed successfully!\n"
.PHONY: up
up:
cd src && npm start
.PHONY: build-rpm
build-rpm:
./node_modules/.bin/electron-builder --linux rpm
.PHONY: build-deb
build-deb:
./node_modules/.bin/electron-builder --linux deb
.PHONY: build-pacman
build-pacman:
./node_modules/.bin/electron-builder --linux pacman
.PHONY: build-win
build-win:
./node_modules/.bin/electron-builder --win
.PHONY: build-linux
build-linux:
./node_modules/.bin/electron-builder --linux
.PHONY: build-all
build-all:
./node_modules/.bin/electron-builder --linux && \
./node_modules/.bin/electron-builder --win
.PHONY: archive-unpacked
archive-unpacked:
zip -r $(DIST_DIR)/todoist-linux.zip $(DIST_DIR)/linux-unpacked/*
.PHONY: copy-to-dropbox
copy-to-dropbox: archive-unpacked
cp $(DIST_DIR)/Todoist_$(VERSION)_amd64.deb $(DROPBOX_DIR)/Todoist.deb && \
cp $(DIST_DIR)/Todoist-$(VERSION).x86_64.rpm $(DROPBOX_DIR)/Todoist.rpm && \
cp $(DIST_DIR)/"Todoist $(VERSION).exe" $(DROPBOX_DIR)/Todoist.exe && \
cp $(DIST_DIR)/todoist-linux.zip $(DROPBOX_DIR)/todoist-linux.zip
.PHONY: set-version
set-version:
cd src && npm version $(VERSION)
.PHONY: clean
clean:
@rm -rf $(DIST_DIR) && printf "\nBuild artifacts (from './$(DIST_DIR)') have been deleted successfully!\n\n"
.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
.PHONY: push-release
push-release:
github-release upload --owner krydos --repo todoist-linux --token ${GITHUB_TOKEN} --tag "${CIRCLE_TAG}" --release-name "Todoist Linux $(VERSION)" --body "..." $(RELEASE_FILES)