mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(CI): clear nightly dir before running dgeni to remove old dirs
also add caching of ionic-site limit ionic-site clone depth use local gulp in node_modules Closes #439
This commit is contained in:
@ -2,6 +2,9 @@ general:
|
|||||||
branches:
|
branches:
|
||||||
ignore:
|
ignore:
|
||||||
- ins_n_outs
|
- ins_n_outs
|
||||||
|
dependencies:
|
||||||
|
cache_directories:
|
||||||
|
- "~/ionic-site" # cache ionic-site
|
||||||
machine:
|
machine:
|
||||||
node:
|
node:
|
||||||
version: 4.1.0
|
version: 4.1.0
|
||||||
|
@ -28,7 +28,7 @@ function run {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install gulp globally for site deploy script.
|
# Install gulp globally for site deploy script.
|
||||||
npm install -g gulp
|
# npm install -g gulp
|
||||||
|
|
||||||
if [[ "$IS_RELEASE" == "true" ]]; then
|
if [[ "$IS_RELEASE" == "true" ]]; then
|
||||||
echo "RELEASE DETECTED!"
|
echo "RELEASE DETECTED!"
|
||||||
|
@ -12,10 +12,21 @@ function init {
|
|||||||
cd ..
|
cd ..
|
||||||
SITE_PATH=$(readJsonProp "config.json" "sitePath")
|
SITE_PATH=$(readJsonProp "config.json" "sitePath")
|
||||||
SITE_DIR=$IONIC_DIR/$SITE_PATH
|
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" \
|
./git/clone.sh --repository="driftyco/ionic-site" \
|
||||||
--directory="$SITE_DIR" \
|
--directory="$SITE_DIR" \
|
||||||
--branch="master"
|
--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 {
|
function run {
|
||||||
@ -23,14 +34,15 @@ function run {
|
|||||||
VERSION=$(readJsonProp "package.json" "version")
|
VERSION=$(readJsonProp "package.json" "version")
|
||||||
|
|
||||||
#compile API Demos
|
#compile API Demos
|
||||||
gulp demos --production=true
|
./node_modules/.bin/gulp demos --production=true
|
||||||
|
|
||||||
# process new docs
|
# process new docs
|
||||||
gulp docs --doc-version="$VERSION_NAME"
|
rm -R $DOCS_DEST/api
|
||||||
|
./node_modules/.bin/gulp docs --doc-version="$VERSION_NAME"
|
||||||
|
|
||||||
# compile sass vars json for ionic-site docs
|
# compile sass vars json for ionic-site docs
|
||||||
gulp docs.sass-variables
|
./node_modules/.bin/gulp docs.sass-variables
|
||||||
cp tmp/sass.json $SITE_DIR/docs/v2/theming/overriding-ionic-variables/
|
cp tmp/sass.json $DOCS_DEST/theming/overriding-ionic-variables/
|
||||||
|
|
||||||
# CD in to the site dir to commit updated docs
|
# CD in to the site dir to commit updated docs
|
||||||
cd $SITE_DIR
|
cd $SITE_DIR
|
||||||
|
Reference in New Issue
Block a user