-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
26 lines (22 loc) · 896 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
SEMVER = go run github.com/maykonlf/semver-cli/cmd/semver@latest
.PHONY: patch
patch:
@if [ "$$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
git pull -r
$(SEMVER) up release
.PHONY: minor
minor:
@if [ "$$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
#git pull -r
$(SEMVER) up minor
.PHONY: release
major:
@if [ "$$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
git pull -r
$(SEMVER) up major
.PHONY: release
release:
sed -i "/<releases>/a \ <release version=\"$$($(SEMVER) get release)\" date=\"$$(date +%F)\">\n <url>https://github.com/getseabird/seabird/releases/tag/$$($(SEMVER) get release)</url>\n </release>" dev.skynomads.Seabird.appdata.xml
git add .semver.yaml dev.skynomads.Seabird.appdata.xml
git commit -m "$$($(SEMVER) get release)"
git tag -a -m "$$($(SEMVER) get release)" "$$($(SEMVER) get release)"