-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_oldbuild.sh
executable file
·131 lines (114 loc) · 2.97 KB
/
_oldbuild.sh
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/bin/bash
path="/Users/ryanhayden/github/cranesvillebiblechurch.com/";
git_path="[email protected]:pastorryanhayden/cranesvillebiblechurch.com.git";
need_build=false;
#!/usr/bin/env bash
echo "Navigate to web root: $path";
cd $path;
echo "Update repo ...";
git pull $git_path;
echo "Test"
echo "Test Abouts from Airtable API"
if $(node ./_buildscripts/test_abouts.js) ;
then
echo 'Abouts changed';
echo 'Build Abouts ...'
node ./_buildscripts/build_abouts.js
need_build=true;
else
echo 'Abouts not changed skip build'
fi
echo "Test Blog from Airtable API"
if $(node ./_buildscripts/test_blog.js) ;
then
echo 'Blog changed';
echo 'Build Blog ...'
node ./_buildscripts/build_blog.js
need_build=true;
else
echo 'Blog not changed skip build'
fi
echo "Test Events from Airtable API"
if $(node ./_buildscripts/test_events.js) ;
then
echo 'Events changed';
echo 'Build Events ...'
node ./_buildscripts/build_events.js
need_build=true;
else
echo 'Events not changed skip build'
fi
echo "Test Ministries from Airtable API"
if $(node ./_buildscripts/test_ministries.js) ;
then
echo 'Ministries changed';
echo 'Build Ministries ...'
node ./_buildscripts/build_ministries.js
need_build=true;
else
echo 'Ministries not changed skip build'
fi
echo "Test homeMinistries from Airtable API"
if $(node ./_buildscripts/test_homeministries.js) ;
then
echo 'homeMinistries changed';
echo 'Build homeMinistries ...'
node ./_buildscripts/build_homeministries.js
need_build=true;
else
echo 'homeMinistries not changed skip build'
fi
echo "Test Photos from Airtable API"
if $(node ./_buildscripts/test_photos.js) ;
then
echo 'Photos changed';
echo 'Build Photos ...'
node ./_buildscripts/build_photos.js
need_build=true;
else
echo 'Photos not changed skip build'
fi
echo "Test Sermons from Airtable API"
if $(node ./_buildscripts/test_sermons.js) ;
then
echo 'Sermons changed';
echo 'Build Sermons ...'
node ./_buildscripts/build_sermons.js
need_build=true;
else
echo 'Sermons not changed skip build'
fi
echo "Test Series from Airtable API"
if $(node ./_buildscripts/test_series.js) ;
then
echo 'Series changed';
echo 'Build Series ...'
node ./_buildscripts/build_series.js
need_build=true;
else
echo 'Series not changed skip build'
fi
echo "Test Home Series from Airtable API"
if $(node ./_buildscripts/test_homeseries.js) ;
then
echo 'Home Series changed';
echo 'Build Home Series ...'
node ./_buildscripts/build_homeseries.js
need_build=true;
else
echo 'Home Series not changed skip build'
fi
if $need_build;
then
# echo "Build Jekyll";
# jekyll build
##
## --This is actually not nescessary because glynn run's jekyll build--
echo "Compile SASS";
node-sass _css/app.scss _site/assets/css/app.css;
echo "Run Glynn";
glynn;
else
echo "Everything up to date. Skip building";
fi
echo -e '\n Complete all scripts';