-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (50 loc) · 1.64 KB
/
Copy pathMakefile
File metadata and controls
64 lines (50 loc) · 1.64 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
ifeq ($(shell uname -m), arm64)
ARCH := _arm64
else
ARCH :=
endif
OS := $(shell uname -s)
# Updater artifacts (.tar.gz/.zip + .sig) require the signing key, so only
# enable them when TAURI_SIGNING_PRIVATE_KEY is set (release CI). Without it,
# plain bundles are built and local/fork-PR builds keep working.
TAURI_BUILD_ARGS :=
ifdef TAURI_SIGNING_PRIVATE_KEY
TAURI_BUILD_ARGS += --config '{"bundle":{"createUpdaterArtifacts":true}}'
endif
build: prebuild
npm run tauri build -- $(TAURI_BUILD_ARGS)
dev: prebuild
npm run tauri dev
%/.git:
git submodule update --init --recursive
src-tauri/icons/icon.png: aw-webui/.git
mkdir -p src-tauri/icons
npm run tauri icon "./aw-webui/media/logo/logo.png"
aw-webui/dist: aw-webui/.git
cd aw-webui && make build
prebuild: aw-webui/dist node_modules src-tauri/icons/icon.png
precommit: format check
format:
cd src-tauri && cargo fmt
check:
cd src-tauri && cargo check && cargo clippy
package:
ifeq ($(OS),Linux)
rm -rf target/package/aw-tauri
mkdir -p target/package/aw-tauri
cp src-tauri/target/release/bundle/deb/*.deb target/package/aw-tauri/aw-tauri$(ARCH).deb
cp src-tauri/target/release/bundle/rpm/*.rpm target/package/aw-tauri/aw-tauri$(ARCH).rpm
cp src-tauri/target/release/bundle/appimage/*.AppImage target/package/aw-tauri/aw-tauri$(ARCH).AppImage
mkdir -p dist/aw-tauri
rm -rf dist/aw-tauri/*
cp target/package/aw-tauri/* dist/aw-tauri/
else
rm -rf target/package
mkdir -p target/package
cp src-tauri/target/release/aw-tauri target/package/aw-tauri
mkdir -p dist
find dist/ -maxdepth 1 -type f -delete 2>/dev/null || true
cp target/package/* dist/
endif
node_modules: package-lock.json
npm ci