mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(release): v0.9.23
This commit is contained in:
committed by
Andy Joslin
parent
bc927e57e7
commit
2f6ac4a986
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic",
|
||||
"version": "0.9.22",
|
||||
"version": "0.9.23",
|
||||
"homepage": "https://github.com/driftyco/ionic",
|
||||
"authors": [
|
||||
"Max Lynch <max@drifty.com>",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"repo": "driftyco/ionic",
|
||||
"development": {},
|
||||
"version": "0.9.22",
|
||||
"version": "0.9.23",
|
||||
"styles": [
|
||||
"dist/css/ionic.css"
|
||||
],
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
padding: 8px !important;
|
||||
}
|
||||
.list {
|
||||
margin: 5px !important;
|
||||
margin: 2px !important;
|
||||
}
|
||||
.button {
|
||||
line-height: 18px !important;
|
||||
min-height: 30px !important;
|
||||
line-height: 16px !important;
|
||||
min-height: 28px !important;
|
||||
}
|
||||
.dot {
|
||||
position: absolute;
|
||||
@@ -76,6 +76,9 @@
|
||||
|
||||
<button id="clear">Clear</button>
|
||||
<button id="stop">Stop</button>
|
||||
<a href="tapInputs.html">Tap Inputs</a> -
|
||||
<a href="/test/">CSS Tests</a> -
|
||||
<a href="./">All Tests</a>
|
||||
|
||||
<div id="logs"></div>
|
||||
|
||||
@@ -165,6 +168,9 @@
|
||||
document.addEventListener('mouseup', function(){
|
||||
console.log('mouseup');
|
||||
});
|
||||
document.addEventListener('mousemove', function(event){
|
||||
console.log('mousemove', 'clientX: ' + event.clientX, 'clientY: ' + event.clientY);
|
||||
});
|
||||
document.addEventListener('click', function(event){
|
||||
console.log('click', 'clientX: ' + event.clientX, 'clientY: ' + event.clientY);
|
||||
});
|
||||
|
||||
@@ -90,6 +90,22 @@
|
||||
Watch Count: {{ radioWatchCount }}
|
||||
</div>
|
||||
|
||||
<div class="item item-divider">
|
||||
Other Tests
|
||||
</div>
|
||||
|
||||
<a href="clickTests.html" class="item">
|
||||
Click Tests
|
||||
</a>
|
||||
|
||||
<a href="/test/" class="item">
|
||||
CSS Tests
|
||||
</a>
|
||||
|
||||
<a href="./" class="item">
|
||||
All JS Tests
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ionic",
|
||||
"private": false,
|
||||
"version": "0.9.23-alpha",
|
||||
"version": "0.9.23",
|
||||
"codename": "oxen-trajectory",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.1",
|
||||
|
||||
@@ -3481,51 +3481,81 @@ a.subdued {
|
||||
border-top-width: 1px;
|
||||
background-size: 0;
|
||||
line-height: 49px; }
|
||||
.tabs .tab-item .badge {
|
||||
background-color: #444444;
|
||||
color: #f8f8f8; }
|
||||
.tabs.tabs-light {
|
||||
background-color: white;
|
||||
background-image: linear-gradient(0deg, #dddddd, #dddddd 50%, transparent 50%);
|
||||
border-color: #dddddd;
|
||||
color: #444444; }
|
||||
.tabs.tabs-light .tab-item .badge {
|
||||
background-color: #444444;
|
||||
color: white; }
|
||||
.tabs.tabs-stable {
|
||||
background-color: #f8f8f8;
|
||||
background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);
|
||||
border-color: #b2b2b2;
|
||||
color: #444444; }
|
||||
.tabs.tabs-stable .tab-item .badge {
|
||||
background-color: #444444;
|
||||
color: #f8f8f8; }
|
||||
.tabs.tabs-positive {
|
||||
background-color: #4a87ee;
|
||||
background-image: linear-gradient(0deg, #145dd7, #145dd7 50%, transparent 50%);
|
||||
border-color: #145dd7;
|
||||
color: white; }
|
||||
.tabs.tabs-positive .tab-item .badge {
|
||||
background-color: white;
|
||||
color: #4a87ee; }
|
||||
.tabs.tabs-calm {
|
||||
background-color: #43cee6;
|
||||
background-image: linear-gradient(0deg, #1aaac3, #1aaac3 50%, transparent 50%);
|
||||
border-color: #1aaac3;
|
||||
color: white; }
|
||||
.tabs.tabs-calm .tab-item .badge {
|
||||
background-color: white;
|
||||
color: #43cee6; }
|
||||
.tabs.tabs-assertive {
|
||||
background-color: #ef4e3a;
|
||||
background-image: linear-gradient(0deg, #cc2511, #cc2511 50%, transparent 50%);
|
||||
border-color: #cc2511;
|
||||
color: white; }
|
||||
.tabs.tabs-assertive .tab-item .badge {
|
||||
background-color: white;
|
||||
color: #ef4e3a; }
|
||||
.tabs.tabs-balanced {
|
||||
background-color: #66cc33;
|
||||
background-image: linear-gradient(0deg, #478f24, #478f24 50%, transparent 50%);
|
||||
border-color: #478f24;
|
||||
color: white; }
|
||||
.tabs.tabs-balanced .tab-item .badge {
|
||||
background-color: white;
|
||||
color: #66cc33; }
|
||||
.tabs.tabs-energized {
|
||||
background-color: #f0b840;
|
||||
background-image: linear-gradient(0deg, #d39511, #d39511 50%, transparent 50%);
|
||||
border-color: #d39511;
|
||||
color: white; }
|
||||
.tabs.tabs-energized .tab-item .badge {
|
||||
background-color: white;
|
||||
color: #f0b840; }
|
||||
.tabs.tabs-royal {
|
||||
background-color: #8a6de9;
|
||||
background-image: linear-gradient(0deg, #552bdf, #552bdf 50%, transparent 50%);
|
||||
border-color: #552bdf;
|
||||
color: white; }
|
||||
.tabs.tabs-royal .tab-item .badge {
|
||||
background-color: white;
|
||||
color: #8a6de9; }
|
||||
.tabs.tabs-dark {
|
||||
background-color: #444444;
|
||||
background-image: linear-gradient(0deg, #111111, #111111 50%, transparent 50%);
|
||||
border-color: #111111;
|
||||
color: white; }
|
||||
.tabs.tabs-dark .tab-item .badge {
|
||||
background-color: white;
|
||||
color: #444444; }
|
||||
@media (min--moz-device-pixel-ratio: 1.5), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {
|
||||
.tabs {
|
||||
padding-top: 2px;
|
||||
@@ -3594,6 +3624,18 @@ a.subdued {
|
||||
.tabs-icon-only .icon {
|
||||
line-height: inherit; }
|
||||
|
||||
.tab-item.has-badge {
|
||||
position: relative; }
|
||||
|
||||
.tab-item .badge {
|
||||
position: absolute;
|
||||
padding: 2px 6px;
|
||||
top: 2%;
|
||||
right: 10%;
|
||||
font-size: 12px;
|
||||
height: auto;
|
||||
line-height: 16px; }
|
||||
|
||||
/* Navigational tab */
|
||||
/* Active state for tab */
|
||||
.tab-item.active,
|
||||
|
||||
2
release/css/ionic.min.css
vendored
2
release/css/ionic.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -693,7 +693,7 @@ angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])
|
||||
}
|
||||
return null;
|
||||
};
|
||||
View.prototype.go = function(opts) {
|
||||
View.prototype.go = function() {
|
||||
|
||||
if(this.stateName) {
|
||||
return $state.go(this.stateName, this.stateParams);
|
||||
@@ -758,10 +758,16 @@ angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])
|
||||
return rsp;
|
||||
}
|
||||
|
||||
if(backView && backView.stateId === currentStateId) {
|
||||
if(viewHistory.forcedNav) {
|
||||
// we've previously set exactly what to do
|
||||
ionic.Utils.extend(rsp, viewHistory.forcedNav);
|
||||
$rootScope.$viewHistory.forcedNav = null;
|
||||
|
||||
} else if(backView && backView.stateId === currentStateId) {
|
||||
// they went back one, set the old current view as a forward view
|
||||
rsp.viewId = backView.viewId;
|
||||
rsp.navAction = 'moveBack';
|
||||
currentView.scrollValues = {}; //when going back, erase scrollValues
|
||||
if(backView.historyId === currentView.historyId) {
|
||||
// went back in the same history
|
||||
rsp.navDirection = 'back';
|
||||
@@ -835,6 +841,7 @@ angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])
|
||||
stateName: this.getCurrentStateName(),
|
||||
stateParams: this.getCurrentStateParams(),
|
||||
url: $location.url(),
|
||||
scrollValues: null
|
||||
});
|
||||
|
||||
// add the new view to this history's stack
|
||||
@@ -926,6 +933,20 @@ angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])
|
||||
return ionic.Utils.nextUid();
|
||||
},
|
||||
|
||||
goToHistoryRoot: function(historyId) {
|
||||
if(historyId) {
|
||||
var hist = $rootScope.$viewHistory.histories[ historyId ];
|
||||
if(hist && hist.stack.length) {
|
||||
$rootScope.$viewHistory.forcedNav = {
|
||||
viewId: hist.stack[0].viewId,
|
||||
navAction: 'moveBack',
|
||||
navDirection: 'back'
|
||||
};
|
||||
hist.stack[0].go();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_getView: function(viewId) {
|
||||
return (viewId ? $rootScope.$viewHistory.histories[ viewId ] : null );
|
||||
},
|
||||
@@ -2256,7 +2277,7 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
|
||||
$ionicViewService.disableRegisterByTagName('tabs');
|
||||
}])
|
||||
|
||||
.directive('tabs', [function() {
|
||||
.directive('tabs', ['$ionicViewService', function($ionicViewService) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
@@ -2323,6 +2344,11 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
|
||||
if(emitChange) {
|
||||
$scope.$emit('viewState.changeHistory', viewData);
|
||||
}
|
||||
} else if(emitChange) {
|
||||
var currentView = $ionicViewService.getCurrentView();
|
||||
if(currentView) {
|
||||
$ionicViewService.goToHistoryRoot(currentView.historyId);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2407,6 +2433,11 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
|
||||
// tell any parent nav controller to animate
|
||||
$scope.animate = $scope.$eval($attr.animate);
|
||||
|
||||
var badge = $parse($attr.badge);
|
||||
$scope.$watch(badge, function(value) {
|
||||
$scope.badge = value;
|
||||
});
|
||||
|
||||
var leftButtonsGet = $parse($attr.leftButtons);
|
||||
$scope.$watch(leftButtonsGet, function(value) {
|
||||
$scope.leftButtons = value;
|
||||
@@ -2479,7 +2510,7 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
|
||||
replace: true,
|
||||
scope: true,
|
||||
template: '<div class="tabs">' +
|
||||
'<tab-controller-item icon-title="{{c.title}}" icon="{{c.icon}}" icon-on="{{c.iconOn}}" icon-off="{{c.iconOff}}" active="c.isVisible" index="$index" ng-repeat="c in controllers"></tab-controller-item>' +
|
||||
'<tab-controller-item icon-title="{{c.title}}" icon="{{c.icon}}" icon-on="{{c.iconOn}}" icon-off="{{c.iconOff}}" badge="c.badge" active="c.isVisible" index="$index" ng-repeat="c in controllers"></tab-controller-item>' +
|
||||
'</div>',
|
||||
link: function($scope, $element, $attr, tabsCtrl) {
|
||||
$element.addClass($scope.tabsType);
|
||||
@@ -2498,6 +2529,7 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
|
||||
icon: '@',
|
||||
iconOn: '@',
|
||||
iconOff: '@',
|
||||
badge: '=',
|
||||
active: '=',
|
||||
tabSelected: '@',
|
||||
index: '='
|
||||
@@ -2512,7 +2544,8 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
|
||||
};
|
||||
},
|
||||
template:
|
||||
'<a ng-class="{active:active}" ng-click="selectTab()" class="tab-item">' +
|
||||
'<a ng-class="{active:active, \'has-badge\':badge}" ng-click="selectTab()" class="tab-item">' +
|
||||
'<i class="badge" ng-if="badge">{{badge}}</i>' +
|
||||
'<i class="icon {{icon}}" ng-if="icon"></i>' +
|
||||
'<i class="{{iconOn}}" ng-if="active"></i>' +
|
||||
'<i class="{{iconOff}}" ng-if="!active"></i> {{iconTitle}}' +
|
||||
@@ -2718,7 +2751,7 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
},
|
||||
template: '<header class="bar bar-header nav-bar invisible">' +
|
||||
'<div class="buttons"> ' +
|
||||
'<button view-back class="button" ng-if="enableBackButton" ng-class="backButtonClass" ng-bind-html="backButtonLabel"></button>' +
|
||||
'<button view-back class="button" ng-if="enableBackButton"></button>' +
|
||||
'<button ng-click="button.tap($event)" ng-repeat="button in leftButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button>' +
|
||||
'</div>' +
|
||||
'<h1 class="title" ng-bind-html="currentTitle"></h1>' +
|
||||
@@ -2726,78 +2759,86 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
'<button ng-click="button.tap($event)" ng-repeat="button in rightButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button>' +
|
||||
'</div>' +
|
||||
'</header>',
|
||||
link: function($scope, $element, $attr) {
|
||||
|
||||
// Create the back button content and show/hide it based on scope settings
|
||||
$scope.enableBackButton = true;
|
||||
$scope.backButtonClass = $attr.backButtonType;
|
||||
if($attr.backButtonIcon) {
|
||||
$scope.backButtonClass += ' icon ' + $attr.backButtonIcon;
|
||||
compile: function(tElement, tAttrs) {
|
||||
var backBtnEle = tElement.find('div').find('button');
|
||||
if(tAttrs.backButtonType) backBtnEle.addClass(tAttrs.backButtonType);
|
||||
|
||||
if(tAttrs.backButtonIcon && tAttrs.backButtonLabel) {
|
||||
backBtnEle.html('<i class="icon ' + tAttrs.backButtonIcon + '"></i> ' + tAttrs.backButtonLabel);
|
||||
} else if(tAttrs.backButtonLabel) {
|
||||
backBtnEle.html(tAttrs.backButtonLabel);
|
||||
} else if(tAttrs.backButtonIcon) {
|
||||
backBtnEle.addClass('icon');
|
||||
backBtnEle.addClass(tAttrs.backButtonIcon);
|
||||
}
|
||||
|
||||
$rootScope.$on('viewState.showNavBar', function(e, showNavBar) {
|
||||
if(showNavBar === false) {
|
||||
$element[0].classList.add('invisible');
|
||||
} else {
|
||||
$element[0].classList.remove('invisible');
|
||||
}
|
||||
});
|
||||
if(tAttrs.type) tElement.addClass(tAttrs.type);
|
||||
|
||||
// Initialize our header bar view which will handle resizing and aligning our title labels
|
||||
var hb = new ionic.views.HeaderBar({
|
||||
el: $element[0],
|
||||
alignTitle: $scope.alignTitle || 'center'
|
||||
});
|
||||
$scope.headerBarView = hb;
|
||||
return function link($scope, $element, $attr) {
|
||||
$scope.enableBackButton = true;
|
||||
|
||||
// Add the type of header bar class to this element
|
||||
$element.addClass($scope.type);
|
||||
|
||||
var updateHeaderData = function(data) {
|
||||
$scope.oldTitle = $scope.currentTitle;
|
||||
|
||||
$scope.currentTitle = (data && data.title ? data.title : '');
|
||||
|
||||
$scope.leftButtons = data.leftButtons;
|
||||
$scope.rightButtons = data.rightButtons;
|
||||
|
||||
if(typeof data.hideBackButton !== 'undefined') {
|
||||
$scope.enableBackButton = data.hideBackButton !== true;
|
||||
}
|
||||
|
||||
if(data.animate !== false && $attr.animation && data.title && data.navDirection) {
|
||||
|
||||
$element[0].classList.add($attr.animation);
|
||||
if(data.navDirection === 'back') {
|
||||
$element[0].classList.add('reverse');
|
||||
$rootScope.$on('viewState.showNavBar', function(e, showNavBar) {
|
||||
if(showNavBar === false) {
|
||||
$element[0].classList.add('invisible');
|
||||
} else {
|
||||
$element[0].classList.remove('reverse');
|
||||
$element[0].classList.remove('invisible');
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize our header bar view which will handle resizing and aligning our title labels
|
||||
var hb = new ionic.views.HeaderBar({
|
||||
el: $element[0],
|
||||
alignTitle: $scope.alignTitle || 'center'
|
||||
});
|
||||
$scope.headerBarView = hb;
|
||||
|
||||
var updateHeaderData = function(data) {
|
||||
$scope.oldTitle = $scope.currentTitle;
|
||||
|
||||
$scope.currentTitle = (data && data.title ? data.title : '');
|
||||
|
||||
$scope.leftButtons = data.leftButtons;
|
||||
$scope.rightButtons = data.rightButtons;
|
||||
|
||||
if(typeof data.hideBackButton !== 'undefined') {
|
||||
$scope.enableBackButton = data.hideBackButton !== true;
|
||||
}
|
||||
|
||||
animate($scope, $element, $scope.oldTitle, data, function() {
|
||||
if(data.animate !== false && $attr.animation && data.title && data.navDirection) {
|
||||
|
||||
$element[0].classList.add($attr.animation);
|
||||
if(data.navDirection === 'back') {
|
||||
$element[0].classList.add('reverse');
|
||||
} else {
|
||||
$element[0].classList.remove('reverse');
|
||||
}
|
||||
|
||||
animate($scope, $element, $scope.oldTitle, data, function() {
|
||||
hb.align();
|
||||
});
|
||||
} else {
|
||||
hb.align();
|
||||
});
|
||||
} else {
|
||||
hb.align();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$rootScope.$on('viewState.viewEnter', function(e, data) {
|
||||
updateHeaderData(data);
|
||||
});
|
||||
|
||||
$rootScope.$on('viewState.titleUpdated', function(e, data) {
|
||||
$scope.currentTitle = (data && data.title ? data.title : '');
|
||||
});
|
||||
|
||||
// If a nav page changes the left or right buttons, update our scope vars
|
||||
$scope.$parent.$on('viewState.leftButtonsChanged', function(e, data) {
|
||||
$scope.leftButtons = data;
|
||||
});
|
||||
$scope.$parent.$on('viewState.rightButtonsChanged', function(e, data) {
|
||||
$scope.rightButtons = data;
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
$rootScope.$on('viewState.viewEnter', function(e, data) {
|
||||
updateHeaderData(data);
|
||||
});
|
||||
|
||||
$rootScope.$on('viewState.titleUpdated', function(e, data) {
|
||||
$scope.currentTitle = (data && data.title ? data.title : '');
|
||||
});
|
||||
|
||||
// If a nav page changes the left or right buttons, update our scope vars
|
||||
$scope.$parent.$on('viewState.leftButtonsChanged', function(e, data) {
|
||||
$scope.leftButtons = data;
|
||||
});
|
||||
$scope.$parent.$on('viewState.rightButtonsChanged', function(e, data) {
|
||||
$scope.rightButtons = data;
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
}])
|
||||
|
||||
4
release/js/ionic-angular.min.js
vendored
4
release/js/ionic-angular.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -5844,6 +5844,7 @@ ionic.views.TabBarItem = ionic.views.View.inherit({
|
||||
|
||||
this._buildItem();
|
||||
},
|
||||
|
||||
// Factory for creating an item from a given javascript object
|
||||
create: function(itemData) {
|
||||
var item = document.createElement('a');
|
||||
@@ -5855,12 +5856,21 @@ ionic.views.TabBarItem = ionic.views.View.inherit({
|
||||
icon.className = itemData.icon;
|
||||
item.appendChild(icon);
|
||||
}
|
||||
|
||||
// If there is a badge, add the badge element
|
||||
if(itemData.badge) {
|
||||
var badge = document.createElement('i');
|
||||
badge.className = 'badge';
|
||||
badge.innerHTML = itemData.badge;
|
||||
item.appendChild(badge);
|
||||
item.className = 'tab-item has-badge';
|
||||
}
|
||||
|
||||
item.appendChild(document.createTextNode(itemData.title));
|
||||
|
||||
return new ionic.views.TabBarItem(item);
|
||||
},
|
||||
|
||||
|
||||
_buildItem: function() {
|
||||
var _this = this, child, children = Array.prototype.slice.call(this.el.children);
|
||||
|
||||
@@ -5871,13 +5881,23 @@ ionic.views.TabBarItem = ionic.views.View.inherit({
|
||||
// TODO: This heuristic might not be sufficient
|
||||
if(child.tagName.toLowerCase() == 'i' && /icon/.test(child.className)) {
|
||||
this.icon = child.className;
|
||||
break;
|
||||
}
|
||||
|
||||
// Test if this is a "i" tag with badge in the class name
|
||||
// TODO: This heuristic might not be sufficient
|
||||
if(child.tagName.toLowerCase() == 'i' && /badge/.test(child.className)) {
|
||||
this.badge = child.textContent.trim();
|
||||
}
|
||||
}
|
||||
|
||||
// Set the title to the text content of the tab.
|
||||
this.title = this.el.textContent.trim();
|
||||
this.title = '';
|
||||
for(i = 0, j = this.el.childNodes.length; i < j; i++) {
|
||||
child = this.el.childNodes[i];
|
||||
|
||||
if (child.nodeName === "#text") {
|
||||
this.title += child.nodeValue.trim();
|
||||
}
|
||||
}
|
||||
|
||||
this._tapHandler = function(e) {
|
||||
_this.onTap && _this.onTap(e);
|
||||
@@ -5901,6 +5921,10 @@ ionic.views.TabBarItem = ionic.views.View.inherit({
|
||||
return this.title;
|
||||
},
|
||||
|
||||
getBadge: function() {
|
||||
return this.badge;
|
||||
},
|
||||
|
||||
setSelected: function(isSelected) {
|
||||
this.isSelected = isSelected;
|
||||
if(isSelected) {
|
||||
@@ -6673,7 +6697,8 @@ ionic.controllers.TabBarController = ionic.controllers.ViewController.inherit({
|
||||
|
||||
this.tabBar.addItem({
|
||||
title: controller.title,
|
||||
icon: controller.icon
|
||||
icon: controller.icon,
|
||||
badge: controller.badge
|
||||
});
|
||||
|
||||
// If we don't have a selected controller yet, select the first one.
|
||||
|
||||
4
release/js/ionic.min.js
vendored
4
release/js/ionic.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -15,6 +15,7 @@ function init {
|
||||
# For testing if we aren't on travis
|
||||
export TRAVIS_BRANCH=master
|
||||
export TRAVIS_BUILD_NUMBER=$RANDOM
|
||||
export TRAVIS_PULL_REQUEST=false
|
||||
# use your github username as GH_ORG to push to, and it will push to ORG/ionic-code, etc
|
||||
export GH_ORG=ajoslin
|
||||
fi
|
||||
@@ -26,7 +27,7 @@ function run {
|
||||
echo "GH_ORG=$GH_ORG"
|
||||
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH"
|
||||
echo "TRAVIS_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER"
|
||||
echo "TRAVIS_PULL_REQUEST=$TRAVIS_BUILD_NUMBER"
|
||||
echo "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
|
||||
|
||||
# Jshint & check for stupid mistakes
|
||||
grunt jshint ddescribe-iit merge-conflict
|
||||
@@ -38,20 +39,15 @@ function run {
|
||||
# TODO Saucelabs settings need more tweaking before it becomes stable (sometimes it fails to connect)
|
||||
# grunt karma:sauce --reporters=dots
|
||||
|
||||
if [[ "$TRAVIS_BRANCH" != "master" ]]; then
|
||||
echo "-- Building on branch $TRAVIS_BRANCH (not master); will not push build out."
|
||||
exit 0
|
||||
fi
|
||||
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
|
||||
echo "-- This is a pull request build; will not push build out."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# if the latest tag points to this commit, then treat
|
||||
# this as a release
|
||||
LATEST_TAG_COMMIT=$(git rev-list --tags --max-count=1)
|
||||
HEAD_COMMIT=$(git rev-parse HEAD)
|
||||
if [ "$LATEST_TAG_COMMIT" == "$HEAD_COMMIT" ]; then
|
||||
# If latest commit message starts with chore(release): it's a release
|
||||
COMMIT_MESSAGE=$(git log --format=%B | head -c 15)
|
||||
|
||||
if [[ "$COMMIT_MESSAGE" == "chore(release):" ]]; then
|
||||
IS_RELEASE=true
|
||||
echo "-- Pushing out a new full release."
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user