Skip to content

Commit

Permalink
chore: makefile tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillich committed Mar 3, 2024
1 parent 962140e commit c7e19d3
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,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
$(SEMVER) up release

.PHONY: minor
minor:
@if [ "$$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
git pull -r
semver up minor
#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
$(SEMVER) up major

.PHONY: release
release:
sed -i "/<releases>/a \ <release version=\"$$(semver get release)\" date=\"$$(date +%F)\"/>" dev.skynomads.Seabird.appdata.xml
sed -i "/<releases>/a \ <release version=\"$$($(SEMVER) get release)\" date=\"$$(date +%F)\"/>" 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)"
git commit -m "$$($(SEMVER) get release)"
git tag -a -m "$$($(SEMVER) get release)" "$$($(SEMVER) get release)"

0 comments on commit c7e19d3

Please sign in to comment.