mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
trying to cache Circle CI's checkout of ionic-site
This commit is contained in:
parent
56fd46d9c3
commit
949c361026
@ -8,7 +8,13 @@ general:
|
||||
branches:
|
||||
only:
|
||||
- master # ignore PRs and branches
|
||||
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- ./scripts/docs/prepare.sh
|
||||
cache_directories:
|
||||
- "~/ionic-site" # cache ionic-site
|
||||
|
||||
test:
|
||||
override:
|
||||
- echo "No tests are written at the moment. But we will attempt to build the library with the latest changes."
|
||||
|
33
scripts/docs/prepare.sh
Executable file
33
scripts/docs/prepare.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "##### "
|
||||
echo "##### prepare.sh"
|
||||
echo "#####"
|
||||
|
||||
|
||||
function init {
|
||||
cd ..
|
||||
SITE_PATH=$(readJsonProp "config.json" "sitePath")
|
||||
cd ..
|
||||
export IONIC_DIR=$PWD
|
||||
SITE_DIR=$IONIC_DIR/$SITE_PATH
|
||||
}
|
||||
|
||||
function run {
|
||||
|
||||
if [ ! -d "$SITE_DIR" ]; then
|
||||
echo "checking out"
|
||||
cd ./scripts
|
||||
./git/clone.sh --repository="driftyco/ionic-site" \
|
||||
--directory="$SITE_DIR" \
|
||||
--branch="master"
|
||||
ls -al $SITE_DIR
|
||||
else
|
||||
echo "using existing"
|
||||
cd $SITE_DIR
|
||||
git reset --hard
|
||||
git pull origin master
|
||||
fi
|
||||
}
|
||||
|
||||
source $(dirname $0)/../utils.inc.sh
|
@ -14,12 +14,11 @@ function init {
|
||||
}
|
||||
|
||||
function run {
|
||||
ls -al
|
||||
cd ./scripts
|
||||
./git/clone.sh --repository="driftyco/ionic-site" \
|
||||
--directory="$SITE_DIR" \
|
||||
--branch="master"
|
||||
cd ..
|
||||
|
||||
cd $SITE_DIR
|
||||
git reset --hard
|
||||
git pull origin master
|
||||
|
||||
VERSION=$(readJsonProp "package.json" "version")
|
||||
|
||||
# process new docs
|
||||
@ -45,4 +44,4 @@ function run {
|
||||
fi
|
||||
}
|
||||
|
||||
source $(dirname $0)/../utils.sh.inc
|
||||
source $(dirname $0)/../utils.inc.sh
|
||||
|
@ -23,4 +23,4 @@ function run {
|
||||
cd ../
|
||||
}
|
||||
|
||||
source $(dirname $0)/../utils.sh.inc
|
||||
source $(dirname $0)/../utils.inc.sh
|
||||
|
Loading…
Reference in New Issue
Block a user