-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
24 lines (18 loc) · 1.03 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
# There are only two rules:
# 1. Variables at the top of the Makefile.
# 2. Targets are listed alphabetically. No, really.
WHOAMI = $(shell basename `pwd`)
YMD = $(shell date "+%Y%m%d")
archive:
tar --exclude='.git*' --exclude='Makefile*' -cvjf $(dest)/$(WHOAMI)-$(YMD).tar.bz2 ./bin ./data ./images ./placetypes ./LICENSE.md ./CONTRIBUTING.md ./README.md
# https://internetarchive.readthedocs.org/en/latest/cli.html#upload
# https://internetarchive.readthedocs.org/en/latest/quickstart.html#configuring
ia:
ia upload $(WHOAMI)-$(YMD) $(src)/$(WHOAMI)-$(YMD).tar.bz2 --metadata="title:$(WHOAMI)-$(YMD)" --metadata="licenseurl:http://creativecommons.org/licenses/by/4.0/" --metadata="date:$(YMD)" --metadata="subject:geo;mapzen;whosonfirst" --metadata="creator:Who's On First (Mapzen)"
internetarchive:
$(MAKE) dest=$(src) archive
$(MAKE) src=$(src) ia
rm $(src)/$(WHOAMI)-$(YMD).tar.bz2
spec:
python ./bin/compile.py > data/placetypes-spec-`date "+%Y%m%d"`.json
cp data/placetypes-spec-`date "+%Y%m%d"`.json data/placetypes-spec-latest.json