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
70 lines
1.6 KiB
Bash
Executable File
70 lines
1.6 KiB
Bash
Executable File
|
|
# adapted from Angular's bower script
|
|
# Script for updating the Ionic bower repos from current build
|
|
|
|
echo "#################################"
|
|
echo "#### Update bower ###############"
|
|
echo "#################################"
|
|
|
|
ARG_DEFS=(
|
|
"--version=(.*)"
|
|
"--codename=(.*)"
|
|
)
|
|
|
|
function init {
|
|
TMP_DIR=$SCRIPT_DIR/../../tmp
|
|
BUILD_DIR=$SCRIPT_DIR/../../dist
|
|
PROJECT_DIR=$SCRIPT_DIR/../..
|
|
|
|
BOWER_DIR=$TMP_DIR/ionic-bower
|
|
}
|
|
|
|
function run {
|
|
|
|
rm -rf $BOWER_DIR
|
|
mkdir -p $BOWER_DIR
|
|
|
|
echo "-- Cloning ionic-bower..."
|
|
git clone https://$GH_ORG:$GH_TOKEN@github.com/$GH_ORG/ionic-bower.git \
|
|
$BOWER_DIR \
|
|
--depth=10
|
|
|
|
# move the files from the build
|
|
echo "-- Putting build files in ionic-bower..."
|
|
|
|
cd $BOWER_DIR
|
|
cp -Rf $BUILD_DIR/* $BOWER_DIR
|
|
cp -Rf $PROJECT_DIR/scss $BOWER_DIR
|
|
|
|
# Angular dependencies are managed by bower, don't include them
|
|
rm -rf $BOWER_DIR/js/angular*
|
|
# Remove bundle, dependencies are again managed by bower!
|
|
rm -rf $BOWER_DIR/js/ionic.bundle.*
|
|
rm -rf $BOWER_DIR/version.json # unneeded
|
|
|
|
# update bower.json
|
|
# tag each repo
|
|
echo "-- Updating version in ionic-bower to $VERSION"
|
|
replaceJsonProp "bower.json" "version" "$VERSION"
|
|
|
|
echo "-- Updating codename in ionic-bower to $CODENAME"
|
|
replaceJsonProp "bower.json" "codename" "$CODENAME"
|
|
|
|
echo "-- Committing and tagging ionic-bower"
|
|
git add -A
|
|
git commit -m "release: v$VERSION"
|
|
git tag -f v$VERSION
|
|
|
|
echo "-- Pushing ionic-bower"
|
|
cd $BOWER_DIR
|
|
|
|
git push -q --tags origin master
|
|
|
|
echo "-- Published ionic-bower to v$VERSION successfully!"
|
|
|
|
# Go back to the script to make things 'safe'
|
|
cd $SCRIPT_DIR
|
|
}
|
|
|
|
source $(dirname $0)/../utils.inc
|