Skip to content

Commit

Permalink
tag
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Oct 16, 2014
1 parent 23ed5e7 commit fac2413
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "http://github.com/kissyteam/promise.git"
},
"dependencies": {
"modulex": "modulex#master"
"modulex": "*"
},
"ignore": [
"**/*",
Expand Down
7 changes: 6 additions & 1 deletion build/promise-debug.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2014, modulex-promise@1.1.2
MIT Licensed
build time: Thu, 16 Oct 2014 06:36:42 GMT
*/
modulex.add("promise", [], function(require, exports, module) {

/*
Expand Down Expand Up @@ -340,7 +345,7 @@ _promise_ = function (exports) {
}
Promise.Defer = Defer;
mix(Promise, {
version: '1.1.1',
version: '1.1.2',
/**
* register callbacks when obj as a promise is resolved
* or call fulfilled callback directly when obj is not a promise object
Expand Down
7 changes: 6 additions & 1 deletion build/promise-standalone-debug.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
var XPromise = (function(){ var module = {};

/*
Copyright 2014, modulex-promise@1.1.2
MIT Licensed
build time: Thu, 16 Oct 2014 06:36:42 GMT
*/
var __promise__;
__promise__ = function (exports) {
/*
Expand Down Expand Up @@ -342,7 +347,7 @@ __promise__ = function (exports) {
}
Promise.Defer = Defer;
mix(Promise, {
version: '1.1.1',
version: '1.1.2',
/**
* register callbacks when obj as a promise is resolved
* or call fulfilled callback directly when obj is not a promise object
Expand Down
2 changes: 1 addition & 1 deletion build/promise-standalone.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/promise.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var jscs = require('gulp-jscs');
var replace = require('gulp-replace');

var wrapper = require('gulp-wrapper');
var date = new Date();
var header = ['/*',
'Copyright ' + date.getFullYear() + ', ' + packageInfo.name + '@' + packageInfo.version,
packageInfo.license + ' Licensed',
'build time: ' + (date.toGMTString()),
'*/', ''].join('\n');

gulp.task('lint', function () {
return gulp.src('./lib/**/*.js')
.pipe(jshint())
Expand Down Expand Up @@ -49,6 +56,9 @@ gulp.task('build', ['lint'], function () {
]
}))
.pipe(replace(/@VERSION@/g, packageInfo.version))
.pipe(wrapper({
header: header
}))
.pipe(gulp.dest(path.resolve(build)))
.pipe(filter(tag + '-debug.js'))
.pipe(replace(/@DEBUG@/g, ''))
Expand All @@ -57,6 +67,12 @@ gulp.task('build', ['lint'], function () {
.pipe(gulp.dest(path.resolve(build)));
});

gulp.task('tag', function (done) {
var cp = require('child_process');
var version = packageInfo.version;
cp.exec('git tag ' + version + ' | git push origin ' + version + ':' + version + ' | git push origin master:master', done);
});

gulp.task('build-standalone', ['build'], function () {
return gulp.src('./build/promise-debug.js')
.pipe(kclean({
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modulex-promise",
"version": "1.1.1",
"version": "1.1.2",
"author": "yiminghe <yiminghe@gmail.com>",
"engines": {
"node": "~0.11"
Expand Down Expand Up @@ -51,13 +51,15 @@
"node-jscover": "^0.6.8",
"node-jscover-coveralls": "^1.0.10",
"node-jscover-handler": "^1.0.3",
"gulp-wrapper": "^0.1.5",
"precommit-hook": "^1.0.7"
},
"precommit": [
"lint"
],
"scripts": {
"start": "node --harmony server",
"publish": "gulp tag",
"test": "node --harmony ./node_modules/mocha/bin/_mocha -R list tests/node/specs",
"lint": "gulp lint",
"browser-test": "mocha-phantomjs http://localhost:8015/tests/browser/runner.html",
Expand Down

0 comments on commit fac2413

Please sign in to comment.