Skip to content

Commit

Permalink
Merge branch 'master' of github.com:driftyco/ionic
Browse files Browse the repository at this point in the history
  • Loading branch information
danbucholtz committed May 6, 2016
2 parents 677d2d4 + c93489e commit 345183d
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 19 deletions.
14 changes: 9 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ checkout:
# copy/pasted from circleCI support)
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
dependencies:
pre:
- ./scripts/site/prepare.sh
cache_directories:
- "~/ionic-site" # cache ionic-site
post:
- bower install
test:
override:
- ./scripts/circle/test.sh --index=$CIRCLE_NODE_INDEX --total=$CIRCLE_NODE_TOTAL
#deployment:
# tasks:
# branch: master
# commands:
# - ./scripts/circle/deploy.sh --sha1=$CIRCLE_SHA1 --index=$CIRCLE_NODE_INDEX --build-number=$CIRCLE_BUILD_NUM
deployment:
tasks:
branch: master
commands:
- ./scripts/circle/deploy.sh --sha1=$CIRCLE_SHA1 --index=$CIRCLE_NODE_INDEX --build-number=$CIRCLE_BUILD_NUM
2 changes: 1 addition & 1 deletion js/utils/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ ionic.tap = {
if (ele && ele.nodeType === 1) {
var element = ele;
while (element) {
if ((element.dataset ? element.dataset.tapDisabled : element.getAttribute && element.getAttribute('data-tap-disabled')) == 'true') {
if (element.getAttribute && element.getAttribute('data-tap-disabled') == 'true') {
return true;
}
element = element.parentElement;
Expand Down
2 changes: 1 addition & 1 deletion scripts/app-base/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function init {
APPBASE_DIR=$HOME/ionic-app-base
APPBASE_LIB_DIR=$APPBASE_DIR/www/lib/ionic

../clone/clone.sh --repository="driftyco/ionic-app-base" \
../clone/clone.sh --repository="ionic-app-base" \
--depth="1" \
--directory="$APPBASE_DIR" \
--branch="master"
Expand Down
2 changes: 1 addition & 1 deletion scripts/bower/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo "#####"
function init {
BOWER_DIR=$HOME/ionic-bower

../clone/clone.sh --repository="driftyco/ionic-bower" \
../clone/clone.sh --repository="ionic-bower" \
--depth="1" \
--directory="$BOWER_DIR" \
--branch="master"
Expand Down
2 changes: 1 addition & 1 deletion scripts/cdn/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "#####"

function init {
CDN_DIR=$HOME/ionic-code
../clone/clone.sh --repository="driftyco/ionic-code" \
../clone/clone.sh --repository="ionic-code" \
--depth="1" \
--directory="$CDN_DIR" \
--branch="gh-pages"
Expand Down
16 changes: 16 additions & 0 deletions scripts/circle/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

ARG_DEFS=(
"--index=(.*)"
"--total=(.*)"
)

function init {

}

function run {
../site/prepare.sh
}

source $(dirname $0)/../utils.inc
8 changes: 6 additions & 2 deletions scripts/clone/clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ function run {

echo "-- Cloning $REPOSITORY#$BRANCH to $DIRECTORY..."

ARGS="--branch=${BRANCH:-master}"
ARGS="--branch=${BRANCH:-master} --depth=3"
if [[ "$DEPTH" != "" ]]; then
ARGS="$ARGS --depth=$DEPTH"
fi
git clone https://driftyco:$GH_TOKEN@github.com/$REPOSITORY $DIRECTORY $ARGS

git config --global user.email "[email protected]"
git config --global user.name "Ionitron"

git clone [email protected]:driftyco/$REPOSITORY.git $DIRECTORY $ARGS
cd $DIRECTORY
git fetch origin --tags
cd ../
Expand Down
2 changes: 1 addition & 1 deletion scripts/demo/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "#####"
function init {
DEMO_DIR=$HOME/ionic-demo

../clone/clone.sh --repository="driftyco/ionic-demo" \
../clone/clone.sh --repository="ionic-demo" \
--depth="1" \
--directory="$DEMO_DIR" \
--branch="gh-pages"
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function init {
RELEASE_DIR=$HOME/ionic-release
../clone/clone.sh --repository="driftyco/ionic" \
../clone/clone.sh --repository="ionic" \
--directory="$RELEASE_DIR" \
--branch="master"
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/site/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo "#####"
function init {
SITE_DIR=$HOME/ionic-site

../clone/clone.sh --repository="driftyco/ionic-site" \
../clone/clone.sh --repository="ionic-site" \
--directory="$SITE_DIR" \
--branch="master"
}
Expand Down
12 changes: 7 additions & 5 deletions scripts/site/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ echo "#####"

function init {
SITE_DIR=$HOME/ionic-site

../clone/clone.sh --repository="driftyco/ionic-site" \
--directory="$SITE_DIR" \
--branch="master"
}

# Example: ./scripts/site/publish.sh --action=docs --version-name=nightly
Expand All @@ -35,7 +31,13 @@ function run {
echo "-- No changes detected in docs for $VERSION_NAME; docs not updated."
else
git add -A
git commit -am "docs: update for $VERSION"
git commit -am "Automated build of native docs driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"

# in case a different commit was pushed to ionic-site during doc/demo gen,
# try to rebase around it before pushing
git fetch
git rebase

git push origin master

echo "-- Updated docs for $VERSION_NAME succesfully!"
Expand Down
33 changes: 33 additions & 0 deletions scripts/site/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

echo "##### "
echo "##### prepare.sh"
echo "#####"


function init {
cd ..
SITE_PATH=../ionic-site
cd ..
export IONIC_DIR=$PWD
SITE_DIR=$IONIC_DIR/$SITE_PATH
}

function run {

if [ ! -d "$SITE_DIR" ]; then
echo "checking out"
cd ./scripts
./clone/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.inc

0 comments on commit 345183d

Please sign in to comment.