-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (54 loc) · 3.62 KB
/
Copy pathMakefile
File metadata and controls
67 lines (54 loc) · 3.62 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
55
56
57
58
59
60
61
62
63
64
65
66
67
.PHONY: dev build build-prod sign notarize clean shell-test version patch-version minor-version major-version
export PATH := $(shell go env GOPATH)/bin:$(PATH)
WAILS := $(shell go env GOPATH)/bin/wails3
# ── Current version (major.minor.patch) ──────────────────────────
# Read from frontend/package.json (single source of truth for the bump).
VERSION := $(shell node -p "require('./frontend/package.json').version")
# ── Version bumping ──────────────────────────────────────────────
# Bump the patch (bugfix): 0.5.0 -> 0.5.1
patch-version:
@node -e "const fs=require('fs');const v=require('./frontend/package.json').version.split('.').map(Number);v[2]++;fs.writeFileSync('./frontend/package.json',fs.readFileSync('./frontend/package.json','utf8').replace(/\""version\"": \"[^\"]+\"/,'\""version\"": \"'+v.join('.')+'\"'));console.log('patched version ->',v.join('.'))"
# Bump the minor (feature): 0.5.0 -> 0.6.0
minor-version:
@node -e "const fs=require('fs');const v=require('./frontend/package.json').version.split('.').map(Number);v[1]++;v[2]=0;fs.writeFileSync('./frontend/package.json',fs.readFileSync('./frontend/package.json','utf8').replace(/\""version\"": \"[^\"]+\"/,'\""version\"": \"'+v.join('.')+'\"'));console.log('minored version ->',v.join('.'))"
# Bump the major (breaking): 0.5.0 -> 1.0.0
major-version:
@node -e "const fs=require('fs');const v=require('./frontend/package.json').version.split('.').map(Number);v[0]++;v[1]=0;v[2]=0;fs.writeFileSync('./frontend/package.json',fs.readFileSync('./frontend/package.json','utf8').replace(/\""version\"": \"[^\"]+\"/,'\""version\"": \"'+v.join('.')+'\"'));console.log('majored version ->',v.join('.'))"
# After bumping package.json, the version is read from it directly
# (build/config.yml `info.version` is the packaging source of truth).
version:
@node -p "require('./frontend/package.json').version"
# ── Development ──────────────────────────────────────────────────
dev:
$(WAILS) dev
# ── Production build (with devtools for debugging) ──────────────
build:
$(WAILS) build -devtools
# ── Production build (without devtools, smaller binary) ──────────
build-prod:
$(WAILS) build
# ── Apple Developer signing (requires certificate) ──────────────
# Usage: make sign ID="Developer ID Application: Your Name (TEAMID)"
sign:
codesign --force --options runtime --sign "$(ID)" \
build/bin/forge-ade.app/Contents/MacOS/forge-ade
codesign --force --options runtime --sign "$(ID)" \
build/bin/forge-ade.app
codesign -dv build/bin/forge-ade.app
# ── Notarize (requires Apple Developer account) ─────────────────
# Usage: make notarize EMAIL="you@email.com" TEAM="TEAMID"
notarize:
ditto -c -k --keepParent build/bin/forge-ade.app build/forge-ade.zip
xcrun notarytool submit build/forge-ade.zip \
--apple-id "$(EMAIL)" \
--team-id "$(TEAM)" \
--password @keychain:AC_PASSWORD \
--wait
xcrun stapler staple build/bin/forge-ade.app
# ── Clean ───────────────────────────────────────────────────────
clean:
rm -rf build/bin
cd frontend && rm -rf dist
# ── Build the terminal animation stress-test CLI ────────────────
shell-test:
cd shell_test && go build -o ../shell-test .