-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 699 Bytes
/
Copy pathMakefile
File metadata and controls
28 lines (21 loc) · 699 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
26
27
28
BROWSER ?= firefox
-include .env
export WEB_EXT_API_KEY WEB_EXT_API_SECRET
dist/$(BROWSER)/manifest.json: $(shell find src -type f)
bun run build -- --browser=$(BROWSER) --zip --zip-source
.PHONY: clean sign-firefox check lint knip fix
clean:
rm -rf dist
sign-firefox: dist/firefox/manifest.json
SOURCE_ZIP=$$(ls dist/*-source.zip 2>/dev/null | head -1) && \
if [ -z "$$SOURCE_ZIP" ]; then echo "Source zip not found" >&2; exit 1; fi && \
bun x web-ext sign \
-s dist/firefox --upload-source-code "$$SOURCE_ZIP" \
-a dist --channel unlisted
check:
bunx tsc --noEmit
lint:
bunx --bun biome check --fix
knip:
bunx knip --fix --fix-type types --fix-type exports
fix: check lint knip