-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (42 loc) · 1.51 KB
/
Makefile
File metadata and controls
54 lines (42 loc) · 1.51 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
SHELL := /bin/bash
APP_DIR := apps/desktop
TAURI_DIR := $(APP_DIR)/src-tauri
VERSION_SCRIPT := scripts/version_manager.sh
.PHONY: help install dev build web-build desktop-build rust-test version-check version-sync test-build
help:
@echo "Available targets:"
@echo " make install # Install frontend dependencies"
@echo " make dev # Start Tauri dev mode"
@echo " make build # Build desktop app"
@echo " make web-build # Build frontend assets only"
@echo " make rust-test # Run Rust tests"
@echo " make version-check # Check version consistency"
@echo " make version-sync VERSION=x.y.z # Sync all version files"
@echo " make test-build VERSION=x.y.z # Sync version and build test package"
install:
pnpm --dir $(APP_DIR) install
dev:
pnpm --dir $(APP_DIR) tauri dev
build: desktop-build
web-build:
pnpm --dir $(APP_DIR) build
desktop-build:
pnpm --dir $(APP_DIR) tauri build
rust-test:
cargo test --manifest-path $(TAURI_DIR)/Cargo.toml
version-check:
bash $(VERSION_SCRIPT) check
version-sync:
@if [ -z "$(VERSION)" ]; then \
echo "VERSION is required. Example: make version-sync VERSION=0.1.1"; \
exit 1; \
fi
bash $(VERSION_SCRIPT) sync --version "$(VERSION)"
bash $(VERSION_SCRIPT) check
test-build:
@if [ -z "$(VERSION)" ]; then \
echo "VERSION is required. Example: make test-build VERSION=0.1.1-beta.1"; \
exit 1; \
fi
$(MAKE) version-sync VERSION="$(VERSION)"
$(MAKE) desktop-build