-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sh
executable file
·69 lines (58 loc) · 1.15 KB
/
build.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
#!/bin/bash
source config.conf;
function copy_changes() {
if [ -f $1/changes.md ]; then
cp $1/changes.md $2/changes.md;
echo "Sync changes file";
fi
}
function set_branch() {
echo "git checkout $BRANCH";
git checkout $BRANCH;
}
function build_platform {
cd ../platform;
echo '-------';
pwd;
echo "git checkout $BRANCH";
git checkout $BRANCH;
copy_changes docs ../docs/src;
echo "Documentation copied";
}
function build_theme_installer {
cd ../theme-installer
echo '-------';
pwd;
git checkout master;
copy_changes docs ../docs/src/components/theme-installer;
echo "Documentation copied";
}
function build_docs {
git checkout $BRANCH;
copy_changes docs ../docs/src/$TYPE/$DIR;
echo "Documentation copied";
}
set_branch;
build_platform;
build_theme_installer;
TYPE='components'
for DIR in "${COMPONENTS[@]}"
do
cd ../;
cd $DIR;
echo '-------';
echo $DIR;
echo '-------';
pwd;
build_docs;
done
TYPE='extensions'
for DIR in "${EXTENSIONS[@]}"
do
cd ../;
echo '-------';
echo $DIR;
echo '-------';
cd $DIR;
build_docs;
done