Skip to content

Commit

Permalink
Update version to 1.10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Jul 19, 2013
1 parent f6e2fc5 commit c8887c9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
27 changes: 19 additions & 8 deletions Gruntfile.js
Expand Up @@ -3,7 +3,9 @@ module.exports = function( grunt ) {
"use strict";

var gzip = require("gzip-js"),
exec = require("child_process").exec;
exec = require("child_process").exec,
fatal = grunt.fail.fatal,
rpreversion = /(\d\.\d+\.\d+)-pre/;

// Project configuration.
grunt.initConfig({
Expand Down Expand Up @@ -168,7 +170,7 @@ module.exports = function( grunt ) {
// Commit a new version
grunt.registerTask( "version", function( version ) {
if ( !/\d\.\d+\.\d+(?:-pre)?/.test(version) ) {
grunt.fail.fatal( "Version must follow semver release format: " + version );
fatal( "Version must follow semver release format: " + version );
return;
}

Expand All @@ -182,7 +184,12 @@ module.exports = function( grunt ) {
var text = grunt.file.read( filename );
text = text.replace( rversion, "$1" + version );
grunt.file.write( filename, text );
exec( "git add " + filename, function() {
console.log( filename );
exec( "git add " + filename, function( err, stdout, stderr ) {
if ( err ) {
fatal( err + " " + stderr );
return;
}
// Commit when all files are added
if ( !--n ) {
grunt.config( "pkg.version", version );
Expand All @@ -194,15 +201,19 @@ module.exports = function( grunt ) {
});

// Release a version of sizzle
grunt.registerTask( "release", function( version, next ) {
if ( !/\d\.\d+\.\d+/.test(version) ) {
grunt.fail.fatal( "Version should be a release version (x.x.x): " + version );
// Updates a pre version to released
// Inserts `next` as the new pre version
grunt.registerTask( "release", function( next ) {
if ( !rpreversion.test(next) ) {
fatal( "Next version should be a -pre version (x.x.x-pre): " + next );
return;
}
if ( !/\d\.\d+\.\d+-pre/.test(next) ) {
grunt.fail.fatal( "Next version should be a -pre version (x.x.x-pre): " + next );
var version = grunt.config( "pkg.version" );
if ( !rpreversion.test(version) ) {
fatal( "Existing version is not a pre version: " + version );
return;
}
version = version.replace( rpreversion, "$1" );

// Build to dist directories along with a map and tag the release
grunt.task.run([
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "sizzle",
"version": "1.10.5-pre",
"version": "1.10.5",
"main": "./dist/sizzle.js",
"devDependencies": {
"qunit": "~1.11.0"
Expand Down
6 changes: 4 additions & 2 deletions dist/sizzle.js
@@ -1,12 +1,12 @@
/*!
* Sizzle CSS Selector Engine v1.10.5-pre
* Sizzle CSS Selector Engine v1.10.5
* http://sizzlejs.com/
*
* Copyright 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-07-17
* Date: 2013-07-19
*/
(function( window ) {

Expand Down Expand Up @@ -1730,6 +1730,8 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {

// Add elements passing elementMatchers directly to results
// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
// Support: IE<9, Safari
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
if ( byElement && elem ) {
j = 0;
Expand Down

0 comments on commit c8887c9

Please sign in to comment.