FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ionic/scripts/docs/deploy.sh at angular-rc1 · Java1024/ionic · GitHub
Java1024
ionic
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ionic
/
scripts
/
docs
/
deploy.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
68 lines (54 loc) · 1.6 KB
Breadcrumbs
ionic
/
scripts
/
docs
/
deploy.sh
Copy path
File metadata and controls
executable file
·
68 lines (54 loc) · 1.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/bash
ARG_DEFS=(
"
--version-name=(.*)
"
)
echo
"
#####
"
echo
"
##### docs/deploy.sh
"
echo
"
#####
"
function
init
{
cd
..
SITE_PATH=
$(
readJsonProp
"
config.json
"
"
sitePath
"
)
SITE_DIR=
$IONIC_DIR
/
$SITE_PATH
DOCS_DEST=
$(
readJsonProp
"
config.json
"
"
docsDest
"
)
if
[
!
-d
"
$SITE_DIR
"
]
;
then
echo
"
checking out
"
./git/clone.sh --repository=
"
driftyco/ionic-site
"
\
--directory=
"
$SITE_DIR
"
\
--branch=
"
master
"
\
--depth=1
else
echo
"
using existing
"
cd
$SITE_DIR
git reset --hard
git pull origin master
cd
$IONIC_DIR
/scripts
fi
}
function
run
{
cd
..
VERSION=
$(
readJsonProp
"
package.json
"
"
version
"
)
#
compile API Demos
./node_modules/.bin/gulp demos --production=true
#
process new docs
if
[
-d
"
$DOCS_DEST
/api
"
]
;
then
rm -R
$DOCS_DEST
/api
fi
./node_modules/.bin/gulp docs --doc-version=
"
$VERSION_NAME
"
#
compile sass vars json for ionic-site docs
./node_modules/.bin/gulp docs.sass-variables
cp tmp/sass.json
$DOCS_DEST
/theming/overriding-ionic-variables/
#
CD in to the site dir to commit updated docs
cd
$SITE_DIR
CHANGES=
$(
git status --porcelain
)
#
if no changes, don't commit
if
[[
"
$CHANGES
"
==
"
"
]]
;
then
echo
"
-- No changes detected for the following commit, docs not updated.
"
echo
"
https://github.com/driftyco/
$CIRCLE_PROJECT_REPONAME
/commit/
$CIRCLE_SHA1
"
else
git add -A
git commit -am
"
Automated build of ionic v
$VERSION
driftyco/
$CIRCLE_PROJECT_REPONAME
@
$CIRCLE_SHA1
"
git push origin master
echo
"
-- Updated docs for
$VERSION_NAME
succesfully!
"
fi
}
source
$(
dirname
$0
)
/../utils.sh.inc
Back
|
FazBrowse Home
|
New Git URL