chore(): travis to circleci

This commit is contained in:
Andrew Joslin
2014-06-03 07:37:51 -06:00
parent 264e092bf8
commit abd7bfa540
21 changed files with 400 additions and 253 deletions

58
scripts/circle/deploy.sh Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
ARG_DEFS=(
"[--is-release=(true|false)]"
"--version-name=(.*)"
)
function run {
cd ../..
git config --global user.name 'Ionitron'
git config --global user.email hi@ionicframework.com
if [[ "$IS_RELEASE" == "true" ]]; then
./scripts/bump/release.sh --new-version="TEST"
else
./scripts/bump/nightly.sh --build-number=$CIRCLE_BUILD_NUM
fi
case $CIRCLE_NODE_INDEX in
0)
# Push release to ionic repo: release only
if [[ "$IS_RELEASE" == "true" ]]; then
./scripts/release/publish.sh
node_modules/.bin/gulp release-tweet
node_modules/.bin/gulp release-irc
fi
;;
1)
# Update site config: release only
if [[ "$IS_RELEASE" == "true" ]]; then
./scripts/site/config.sh
fi
# Update app-base: release only
if [[ "$IS_RELEASE" == "true" ]]; then
./scripts/app-base/publish.sh
fi
;;
2)
# Update docs
./scripts/site/docs.sh --version-name="$VERSION_NAME"
;;
3)
# Update demos
./scripts/demo/publish.sh --version-name="$VERSION_NAME"
;;
4)
# Update cdn
./scripts/cdn/publish.sh --version-name="$VERSION_NAME"
;;
5)
# Update bower
./scripts/bower/publish.sh
;;
esac
}
source $(dirname $0)/../utils.inc

View File

@@ -1,29 +0,0 @@
#!/bin/bash
function init {
# Global Variables
export SAUCE_TUNNEL_ID=$($CIRCLE_BUILD_NUM || $RANDOM)
export SAUCE_BUILD_ID=$($CIRCLE_SHA1 || $RANDOM)
}
function run {
case $CIRCLE_NODE_INDEX in
0)
../snapshot/run.sh \
--width="400" \
--height="800" \
--browser="chrome" \
--platform-id="chrome_desktop_small"
;;
1)
../snapshot/run.sh \
--width="400" \
--height="800" \
--browser="safari" \
--platform="OS X 10.9" \
--platform-id="safari_desktop_small"
;;
esac
}
source $(dirname $0)/../utils.inc

55
scripts/circle/test.sh Executable file
View File

@@ -0,0 +1,55 @@
#!/bin/bash
ARG_DEFS=(
"--index=(.*)"
"--total=(.*)"
)
function init {
# Global Variables
export SAUCE_TUNNEL_ID=${CIRCLE_BUILD_NUM:-$RANDOM}-$CIRCLE_NODE_INDEX
export SAUCE_BUILD_ID=${CIRCLE_SHA1:-$RANDOM}
}
function run {
cd ../..
node_modules/.bin/gulp demos --demo-version=nightly
TEST_ID=$CIRCLE_SHA1-$CIRCLE_BUILD_NUM
case $INDEX in
0)
node_modules/.bin/gulp jshint ddescribe-iit
node_modules/.bin/gulp karma --browsers=PhantomJS --reporters=dots
;;
1)
# node_modules/.bin/gulp snapshot-sauce \
# --browser="chrome" \
# --params.width="400" \
# --params.height="800" \
# --params.test_id=$TEST_ID
# --params.platform_id="chrome_desktop_small" \
# --params.platform_index=$INDEX \
# --params.platform_count=$TOTAL
;;
2)
# node_modules/.bin/gulp snapshot-sauce \
# --browser="safari" \
# --platform="OS X 10.9"
# --params.width="400" \
# --params.height="800" \
# --params.test_id=$TEST_ID \
# --params.platform_id="safari_desktop_small" \
# --params.platform_index=$INDEX \
# --params.platform_count=$TOTAL
;;
3)
;;
4)
;;
5)
;;
esac
}
source $(dirname $0)/../utils.inc