-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (33 loc) · 1.09 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
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := zip
.ONESHELL:
IMAGE := alfred-meme
bin/alfred-meme: $(shell find ./ -name '*.go')
GOOS=darwin go build -o bin/alfred-meme main.go
zip: info.plist Makefile alfred-meme.sh bin/alfred-meme memes/ icon.png
zip -r $(IMAGE).alfredworkflow $^
clean:
rm -rf $(IMAGE).alfredworkflow
rm -rf bin
.PHONY: clean
.PHONY: minor
minor: ## Create a minor git tag and push it
sed -i "" 's/$(shell semver current | tr -d 'v' )/$(shell semver -n | rev | cut -d ' ' -f1 | rev | tr -d 'v')/' info.plist
make commitVersion
semver
git push --tags
.PHONY: patch
patch: ## Create a patch git tag and push it
sed -i "" 's/$(shell semver current | tr -d 'v' )/$(shell semver -p -n | rev | cut -d ' ' -f1 | rev | tr -d 'v')/' info.plist
make commitVersion
semver --patch
git push --tags
.PHONY: commitVersion
commitVersion:
git add info.plist
git commit -m 'bumped version' info.plist
.PHONY:
help: ## Show this help.
@grep '.*:.*##' Makefile | grep -v grep | sort | sed 's/:.* ##/:/g' | column -t -s: