mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Main changes: * Use gulpfile now (build was getting way too disorganized with custom tasks; gulpfiles are much easier to build clean custom tasks with than Grunt. * View README#Development for updated commands * Docs written for ionContent, ionHeaderBar, ionInfiniteScroll. * Docs are pushed to ajoslin's fork of ionic-site until they reach a * point where they can be published. **TODO, In Order of Priority** 1. Finish writing source-documentation for all existing components 2. Add multiple versions of docs (one per release & nightly, latest stable release docs being shown by default) 3. Add examples generation 4. Add searchbar to docs
50 lines
1.0 KiB
Bash
Executable File
50 lines
1.0 KiB
Bash
Executable File
|
|
echo "#################################"
|
|
echo "#### Update CDN #################"
|
|
echo "#################################"
|
|
|
|
# Version name is "nightly" or a version number
|
|
ARG_DEFS=(
|
|
"--version=(.*)"
|
|
"--version-name=(.*)"
|
|
)
|
|
|
|
function init {
|
|
PROJECT_DIR=$SCRIPT_DIR/../..
|
|
BUILD_DIR=$SCRIPT_DIR/../../dist
|
|
|
|
IONIC_CODE_DIR=$SCRIPT_DIR/../../tmp/ionic-code
|
|
rm -rf $IONIC_CODE_DIR
|
|
mkdir -p $IONIC_CODE_DIR
|
|
}
|
|
|
|
function run {
|
|
|
|
echo "-- Cloning ionic-code..."
|
|
git clone https://$GH_ORG:$GH_TOKEN@github.com/$GH_ORG/ionic-code.git \
|
|
$IONIC_CODE_DIR \
|
|
--depth=10 \
|
|
--branch gh-pages
|
|
|
|
VERSION_DIR=$IONIC_CODE_DIR/$VERSION_NAME
|
|
rm -rf $VERSION_DIR
|
|
mkdir -p $VERSION_DIR
|
|
|
|
cd $VERSION_DIR
|
|
cp -R $BUILD_DIR/* $VERSION_DIR
|
|
|
|
echo "-- Generating versions.json..."
|
|
cd $IONIC_CODE_DIR/builder
|
|
python ./generate.py > /dev/null
|
|
|
|
cd $IONIC_CODE_DIR
|
|
git add -A
|
|
git commit -am "release: $VERSION ($VERSION_NAME)"
|
|
|
|
git push -q origin gh-pages
|
|
|
|
echo "-- Published ionic-code to v$VERSION successfully!"
|
|
}
|
|
|
|
source $(dirname $0)/../utils.inc
|