-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
42 lines (30 loc) · 1.29 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
zap: zap-containers containers-up pause import-spatial load-spatial
rezap: dump-spatial zap
import-spatial:
ifneq ("weather.gov/spatial-data/dump.mysql","")
cat weather.gov/spatial-data/dump.mysql | docker compose exec -T database mysql -udrupal -pdrupal -hdatabase weathergov
endif
### Spatial data
load-spatial: # Load spatial data into the database
docker compose run --rm spatial node load-shapefiles.js
dump-spatial:
docker compose exec database mysqldump -udrupal -pdrupal -hdatabase --no-tablespaces weathergov weathergov_geo_metadata weathergov_geo_states weathergov_geo_counties weathergov_geo_places weathergov_geo_cwas weathergov_geo_zones > weather.gov/spatial-data/dump.mysql
update-settings:
cp -f weather.gov/web/sites/example.settings.dev.php weather.gov/web/sites/settings.dev.php
zap-containers:
docker compose stop
docker compose rm -f
containers-up:
docker compose up -d
pause:
sleep 15
build-css: # Build CSS
docker compose run --rm uswds npx gulp compile
python-lint:
docker compose exec web python -m black .
docker compose exec web python -m flake8 .
template-lint:
docker compose exec web djlint weather/templates/ --extension=html
template-format:
docker compose exec web djlint weather/templates/ --reformat --extension=html
lint: python-lint template-format template-lint