mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
chore(CI): refactoring CI scripts for security and performance
This commit is contained in:
@ -13,20 +13,6 @@ function init {
|
||||
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 {
|
||||
|
||||
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="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.sh.inc
|
||||
Reference in New Issue
Block a user