Deploy 0.6.16

This commit is contained in:
Kevin Jahns 2015-11-04 14:32:04 +01:00
parent 1fa1f1a668
commit a7021b9212
2 changed files with 23 additions and 19 deletions

View File

@ -52,7 +52,7 @@ var jasmine = require('gulp-jasmine')
var jasmineBrowser = require('gulp-jasmine-browser')
var concat = require('gulp-concat')
var watch = require('gulp-watch')
var exec = require('child_process').exec
var shell = require('gulp-shell')
var $ = require('gulp-load-plugins')()
var options = minimist(process.argv.slice(2), {
@ -129,23 +129,26 @@ gulp.task('deploy:bump', function () {
.pipe(gulp.dest('./'))
})
gulp.task('deploy:commit', function () {
gulp.src(['./*', '!./node_modules', '!./build', '!./y.*', '!./dist'] )
.pipe($.git.commit('bumps package version', {args: '-n'}))
return gulp.src('./dist/*')
.pipe($.git.commit('New release', { maxBuffer: 20000 * 1024, args: '-n', cwd: './dist'}))
})
gulp.task('deploy:tag', function () {
return gulp.src('./package.json')
.pipe($.tagVersion({cwd: './dist'}))
})
gulp.task('deploy', ['deploy:updateSubmodule', 'deploy:bump', 'deploy:build', 'deploy:copy', 'deploy:commit', 'deploy:tag'], function (cb) {
exec('echo yayy && echo yooo', function (err, stdout, stderr) {
console.log(err)
cb(err)
})
gulp.task('deploy', ['deploy:updateSubmodule', 'deploy:bump', 'deploy:build', 'deploy:copy'], function () {
return gulp.src('./package.json', {read: false})
.pipe(shell([
'echo "Deploying version <%= getVersion(file.path) %>"',
'cd ./dist/',
'git add -A',
'git commit -am "Deploy <%= getVersion(file.path) %>" -n',
'git tag -a v<%= getVersion(file.path) %>',
'git push',
'git push origin --tags',
'cd ..',
'git commit -am "Release <%= getVersion(file.path) %>" -n',
'git push'
], {
templateData: {
getVersion: function (s) {
return require(s).version
}
}
}))
})
gulp.task('build:test', function () {

View File

@ -1,6 +1,6 @@
{
"name": "yjs",
"version": "0.6.15",
"version": "0.6.17",
"description": "A framework for real-time p2p shared editing on arbitrary complex data types",
"main": "y.js",
"scripts": {
@ -51,6 +51,7 @@
"gulp-jasmine": "^2.0.1",
"gulp-jasmine-browser": "^0.2.3",
"gulp-load-plugins": "^1.0.0",
"gulp-shell": "^0.5.1",
"gulp-sourcemaps": "^1.5.2",
"gulp-tag-version": "^1.3.0",
"gulp-uglify": "^1.4.1",