forked from ieee-vgtc/ieeevis.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (62 loc) · 2.23 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
PRODUCTION_BUCKET=ieeevis.org
STAGING_BUCKET=staging.ieeevis.org
NEW_BUCKET=redesign.ieeevis.org
PRODUCTION_BRANCH=production
STAGING_BRANCH=master
NEW_BRANCH=development
2022_BRANCH=vis2022
2022_RELEASE=vis2022-release
all: site
site:
./scripts/check_duplicate_permalinks.py
jekyll build
./scripts/fix_file_extensions.sh
newsite:
# ./scripts/check_duplicate_permalinks.py
jekyll build
./scripts/fix_file_extensions.sh
./scripts/buildyear.sh
new2022:
npm install
npm run-script build
jekyll build -d ./_site/year/2022
./scripts/fix_file_extensions.sh
production: site
cd _site && ../scripts/sync_with_s3_boto.py $(PRODUCTION_BRANCH) $(PRODUCTION_BUCKET)
staging: site
cd _site && ../scripts/sync_with_s3_boto.py $(STAGING_BRANCH) $(STAGING_BUCKET)
stagingnew: newsite
cd _site && ../scripts/sync_with_s3_boto.py $(NEW_BRANCH) $(STAGING_BUCKET)
# don't want to index staging...
staging2022: new2022
cp -f robots.txt -t _site/
cd _site && ../scripts/sync_with_s3_boto.py $(2022_BRANCH) $(STAGING_BUCKET)
productionnew: newsite
cd _site && ../scripts/sync_with_s3_boto.py $(NEW_BRANCH) $(PRODUCTION_BUCKET)
production2022: new2022
cd _site && ../scripts/sync_with_s3_boto.py $(2022_BRANCH) $(PRODUCTION_BUCKET)
release2022: new2022
cd _site && ../scripts/sync_with_s3_boto.py $(2022_RELEASE) $(PRODUCTION_BUCKET)
new: newsite
cd _site && ../scripts/sync_with_s3_boto.py $(NEW_BRANCH) $(NEW_BUCKET)
check: check-bad-links check-permalink-paths check-content-expiration
################################################################################
lint: check-bad-links check-permalink-paths check-content-expiration
check-bad-links:
./scripts/check-links.sh
check-permalink-paths:
./scripts/check-permalink-paths.py
check-content-expiration:
./scripts/check-content-expiration.py
################################################################################
# sometimes you might want to clean the entire bucket - but this can
# eat a lot of bandwidth, and the website will be missing content for
# a little while. BEWARE
staging-clean:
aws s3 rm s3://$(STAGING_BUCKET)/ --recursive
production-clean:
aws s3 rm s3://$(PRODUCTION_BUCKET)/ --recursive
new-clean:
aws s3 rm s3://$(NEW_BUCKET)/ --recursive
autogen-clean:
rm data/autogen/*