Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (67 loc) · 1.87 KB
/
Copy pathMakefile
File metadata and controls
79 lines (67 loc) · 1.87 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
68
69
70
71
72
73
74
75
76
77
78
79
.PHONY: all install test validate export sync import schema clean help serve
SHELL := /bin/bash
RUNNER := $(shell which bun >/dev/null 2>&1 && echo "bun" || echo "npm")
all: test validate
install:
@if [ "$(RUNNER)" = "bun" ]; then \
echo "Installing dependencies with Bun..."; \
bun install; \
else \
echo "Installing dependencies with npm..."; \
npm install; \
fi
test:
@if [ "$(RUNNER)" = "bun" ]; then \
bun test; \
else \
npm test; \
fi
validate:
@if [ "$(RUNNER)" = "bun" ]; then \
bun run scripts/validate.ts; \
else \
npm run validate:node; \
fi
export:
@if [ "$(RUNNER)" = "bun" ]; then \
bun run scripts/export-catalog.ts; \
else \
npm run export:node; \
fi
sync:
@if [ "$(RUNNER)" = "bun" ]; then \
bun run scripts/sync-upstream.ts; \
else \
npm run sync:node; \
fi
import:
@if [ "$(RUNNER)" = "bun" ]; then \
bun run scripts/import-pla.ts; \
else \
npm run import:node; \
fi
schema:
@if [ "$(RUNNER)" = "bun" ]; then \
bun run scripts/generate-schema.ts; \
else \
npm run generate-schema; \
fi
clean:
@rm -rf dist .cache web/catalog.json web/status.json web/catalog-data.js web/icons
@echo "Cleaned build, cache, and generated web artifacts."
serve:
@if [ "$(RUNNER)" = "bun" ]; then \
bun run scripts/serve.ts; \
else \
npm run serve:node; \
fi
help:
@echo "AnyLinux Metadata Build Targets:"
@echo " make install - Install project dependencies"
@echo " make test - Run automated schema test suite"
@echo " make validate - Validate all application manifests"
@echo " make export - Compile catalog.json and appstream.xml.gz"
@echo " make sync - Synchronize backlog with upstream and Flathub"
@echo " make import - Ingest metadata from Portable-Linux-Apps"
@echo " make schema - Regenerate JSON Schema from TypeScript definitions"
@echo " make clean - Remove dist/ and .cache/ artifacts"