-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
49 lines (37 loc) · 1.29 KB
/
Copy pathjustfile
File metadata and controls
49 lines (37 loc) · 1.29 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
set dotenv-load
local-server-port := "8081"
bloom-filter := "502115651" # 268435456
bloom-filter-filename := "filter_" + bloom-filter + "_1_norm.bin"
bloom-filter-url := "bloom-filters" / bloom-filter-filename
server-path := env("SERVER_PATH")
# Run the frontend in development mode on localhost
[working-directory: 'frontend']
dev:
BLOOM_FILTER_URL="{{ bloom-filter-url }}" trunk serve --release
[working-directory: 'frontend']
build-frontend:
BLOOM_FILTER_URL="{{ bloom-filter-url }}" trunk --config ./Trunk.deploy.toml build --release --dist ./dist
[working-directory: 'report']
build-report:
typst compile paper.typ
[working-directory: 'report']
watch-report:
typst watch paper.typ
[working-directory: 'frontend/bloom-filters']
compress-filter:
gzip -k -9 {{ bloom-filter-filename }}
brotli -k -Z {{ bloom-filter-filename }}
# Build the application and upload it to the webserver
deploy: build-frontend build-report
@echo "deploying to {{ server-path }}"
rsync -avzi ./frontend/dist/ "{{ server-path }}"
scp ./report/paper.pdf "{{ server-path / "precomputing-pegsolitaire-paper.pdf" }}"
rsync -avzi .htaccess "{{ server-path }}"
test:
cargo test
# Remove all cached build artifacts
[confirm]
clean:
rm -rf target/
rm -rf frontend/dist/
rm -rf dist/