Skip to content

Commit

Permalink
Merge pull request #57 from cloudnautique/main
Browse files Browse the repository at this point in the history
add makefile function to update version
  • Loading branch information
cloudnautique authored Feb 15, 2024
2 parents 9dcc83a + 456479b commit 548b217
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.PHONY: create-tag

TAG := $(or $(TAG),main)
GITHUB_WORKFLOW := $(or $(GITHUB_WORKFLOW),local)
REGISTRY := $(or $(REGISTRY),index.docker.io)
Expand Down Expand Up @@ -42,6 +44,18 @@ build_and_push_images:
fi \
done

create-tag:
@if [ -z "$(VERSION)" ]; then \
echo "VERSION is not set. Usage: make create-tag VERSION=x.y.z"; \
exit 1; \
fi
$(eval TAURI_VERSION := $(patsubst v%,%,$(VERSION)))
@jq '.package.version = "$(TAURI_VERSION)"' ./tauri/src-tauri/tauri.conf.json > temp.json && mv temp.json ./tauri/src-tauri/tauri.conf.json
@git add ./tauri/src-tauri/tauri.conf.json
@git commit -m "Update version to $(VERSION)"
@git tag -a "$(VERSION)" -m "Release $(VERSION)"
@echo "Tagged version $(VERSION)"

init-docs:
docker run --rm --workdir=/docs -v $${PWD}/docs:/docs node:18-buster yarn install

Expand Down

0 comments on commit 548b217

Please sign in to comment.