-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
55 lines (44 loc) · 1.49 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
# Load custom setitngs
-include .env
export
PROVISION ?= docker
include etc/$(PROVISION)/makefile
ifdef command
override command := -c "$(command)"
endif
ifeq ($(shell uname), Darwin)
open = open
else ifeq ($(shell uname), Linux))
open = xdg-open
else ifeq ($(shell uname), Windows_NT))
open = explorer
endif
install: build bundle test open
squash: branch := $(shell git rev-parse --abbrev-ref HEAD)
squash:
git rebase -i $(shell git merge-base origin/$(branch) origin/master)
git push -f
push: branch := $(shell git rev-parse --abbrev-ref HEAD)
push: ## Review, add, commit and push changes using commitizen. Usage: make push
git diff
git add -A .
@docker run --rm -it -e CUSTOM=true -v $(CURDIR):/app -v $(HOME)/.gitconfig:/root/.gitconfig aplyca/commitizen
git pull origin $(branch)
git push -u origin $(branch)
checkoutlatesttag:
git fetch --prune origin "+refs/tags/*:refs/tags/*"
git checkout $(shell git describe --always --abbrev=0 --tags)
checknewrelease:
git describe --tags --exact-match $(shell git rev-parse HEAD)
publish: test release checknewrelease checkoutlatesttag deploy ## 🎉 Publish new version to Prodcution
git checkout master
test:
$(info Tests not implemented yet)
h help: ## ℹ️ This help.
@echo 'ℹ️ Usage: make <task> [option=value]'
@echo 'Default task: install'
@echo
@echo '🛠️ Tasks:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9., _-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := install
.PHONY: all