-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (22 loc) · 752 Bytes
/
Makefile
File metadata and controls
25 lines (22 loc) · 752 Bytes
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
TAG := $(shell git describe --abbrev=0 --tags)
TAG_NUM := $(shell echo $(TAG) | sed 's/v//')
NEXT_TAG := v$(shell echo $$(( $(TAG_NUM) + 1 )))
lint:
biome check --write . && pnpm knip
update:
pnpm self-update
pnpm update --interactive --latest
deploy: lint
@if [ -n "$(git status --porcelain)" ]; then \
echo "Error: Git working directory is not clean. Please commit or stash changes first."; \
exit 1; \
fi
@git fetch origin
@if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then \
echo "Error: Local branch is not up-to-date with remote. Please pull the latest changes."; \
exit 1; \
fi
@echo "Creating and pushing tag $(NEXT_TAG)"
git tag -a $(NEXT_TAG) -m "Version $(NEXT_TAG)"
git push origin $(NEXT_TAG)
git push