forked from PlugFox/flutter-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (35 loc) · 919 Bytes
/
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
SHELL :=/bin/bash -e -o pipefail
PWD := $(shell pwd)
.PHONY: help
help:
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
@echo ''
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: setup
setup: ## setup environment
@npm install
@npm install -g @vscode/vsce
.PHONY: login
login: ## login to vsce
@vsce login plugfox
.PHONY: build
build: setup ## build extension
@vsce package
.PHONY: publish
publish: build ## publish extension
@vsce publish
.PHONY: minor
minor: build ## publish minor version
@vsce publish minor
.PHONY: test
test: ## run tests
@npm install
@npm test
.PHONY: diff
diff: ## git diff
$(call print-target)
@git diff --exit-code
@RES=$$(git status --porcelain) ; if [ -n "$$RES" ]; then echo $$RES && exit 1 ; fi
define print-target
@printf "Executing target: \033[36m$@\033[0m\n"
endef