-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
55 lines (44 loc) · 1.49 KB
/
Makefile
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
OUTPUT_DIR?=public_html
DB_DIR?=repositories
MAINTAINER_MAPPING?=pagure_owner_alias.json
PRODUCT_VERSION_MAPPING?=product_version_mapping.json
help:
@echo "sync-repositories: download RPM repository metadata for active releases"
@echo "fetch-data: download package-maintainer mapping from dist-git and release version mapping from pdc"
@echo "html: generate static website"
@echo "js: generate js"
@echo "setup-js: get js dependencies"
@echo "all: all of the above, in order"
@echo "clean: remove artefacts"
@echo "update-solr: update solr index. must have SOLR_CORE and SOLR_URL defined"
ifneq (,$(wildcard vue/node_modules))
all: sync-repositories fetch-data js html
else
all: sync-repositories fetch-data setup-js js html
endif
html-only: sync-repositories fetch-data html
update-solr:
bin/update-solr.py
sync-repositories:
mkdir -p $(DB_DIR)
bin/fetch-repository-dbs.py --target-dir $(DB_DIR)
fetch-data:
curl https://src.fedoraproject.org/extras/pagure_owner_alias.json -o $(MAINTAINER_MAPPING)
bin/get-product-names.py
html:
mkdir -p $(OUTPUT_DIR)/assets
cp -r assets/* $(OUTPUT_DIR)/assets
cp assets/images/favicon.ico $(OUTPUT_DIR)/
bin/generate-html.py --target-dir $(OUTPUT_DIR)
js:
cd vue && npm run prod && cd ..
mkdir -p $(OUTPUT_DIR)/assets/js
cp vue/dist/* $(OUTPUT_DIR)/assets/js
js-dev:
cd vue && npm run build && cd ..
mkdir -p $(OUTPUT_DIR)/assets/js
cp vue/dist/* $(OUTPUT_DIR)/assets/js
setup-js:
cd vue && npm i
clean:
rm -r $(OUTPUT_DIR) $(DB_DIR) $(MAINTAINER_MAPPING)