forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.sh
More file actions
executable file
·40 lines (28 loc) · 923 Bytes
/
config.sh
File metadata and controls
executable file
·40 lines (28 loc) · 923 Bytes
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
#!/bin/bash
ARG_DEFS=(
)
echo "##### "
echo "##### site/config.sh"
echo "#####"
function init {
SITE_DIR=$HOME/ionic-site
../clone/clone.sh --repository="driftyco/ionic-site" \
--directory="$SITE_DIR" \
--branch="master"
}
function run {
cd ../..
VERSION=$(readJsonProp "package.json" "version")
CODENAME=$(readJsonProp "package.json" "codename")
DATE=$(date +"%Y-%m-%d")
cd $SITE_DIR
npm install
$(replaceInFile "_config.yml" "latest_download:.*$" "latest_download: http:\/\/code.ionicframework.com\/$VERSION\/ionic-v$VERSION.zip")
$(replaceInFile "_config.yml" "latest_version:.*$" "latest_version: $VERSION \"$CODENAME\"")
$(replaceInFile "_config.yml" "latest_release_date:.*$" "latest_release_date: $DATE")
git add -A
git commit -am "release: $VERSION"
source deploy.sh
echo "-- Published ionic-site config v$VERSION successfully!"
}
source $(dirname $0)/../utils.inc