mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
Gulp: More work on improved publish task for Bower.
This commit is contained in:
parent
1b1b9a1606
commit
0311c267f5
9 changed files with 40 additions and 32 deletions
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -1,7 +1,9 @@
|
|||
# Change Log
|
||||
All notable changes to Paper.js shall be documented in this file, following
|
||||
common [CHANGELOG](http://keepachangelog.com/) conventions. As of `0.10.0`,
|
||||
Paper.js adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## `0.10.2`
|
||||
|
||||
### Fixed
|
||||
- Get published version to work correctly in Bower again.
|
||||
|
||||
## `0.10.1`
|
||||
|
||||
|
@ -14,9 +16,12 @@ Paper.js adheres to [Semantic Versioning](http://semver.org/).
|
|||
### Preamble
|
||||
|
||||
This is a huge release for Paper.js as we aim for a version `1.0.0` release
|
||||
later this year. There are many items in the changelog (and many more items not
|
||||
in the changelog) so here a high-level overview to frame the long list of
|
||||
changes:
|
||||
later this year. As of this version, all notable changes are documented in the
|
||||
change-log following common [CHANGELOG](http://keepachangelog.com/) conventions.
|
||||
Paper.js now also adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
There are many items in the changelog (and many more items not in the changelog)
|
||||
so here a high-level overview to frame the long list of changes:
|
||||
|
||||
- Boolean operations have been improved and overhauled for reliability and
|
||||
efficiency. These include the path functions to unite, intersect, subtract,
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
"main": "dist/paper-full.js",
|
||||
"ignore": [
|
||||
"build",
|
||||
"components",
|
||||
"dist/paper-node.js",
|
||||
"projects",
|
||||
"gulp",
|
||||
"node_modules",
|
||||
"package.json",
|
||||
"projects",
|
||||
"src",
|
||||
"test"
|
||||
"test",
|
||||
"travis"
|
||||
],
|
||||
"keywords": [
|
||||
"vector",
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 698991bfba9210c6d94c08bd70ba9f815ea98bdf
|
||||
Subproject commit b6f36edba33690cee908cadcb24515ec5be97b1d
|
|
@ -17,7 +17,7 @@ var gulp = require('gulp'),
|
|||
whitespace = require('gulp-whitespace'),
|
||||
del = require('del'),
|
||||
extend = require('extend'),
|
||||
options = require('../utils/options.js')({ suffix: true });
|
||||
options = require('../utils/options.js');
|
||||
|
||||
// Options to be used in Prepro.js preprocessing through the global __options
|
||||
// object, merged in with the options required above.
|
||||
|
|
|
@ -14,7 +14,7 @@ var gulp = require('gulp'),
|
|||
del = require('del'),
|
||||
rename = require('gulp-rename'),
|
||||
shell = require('gulp-shell'),
|
||||
options = require('../utils/options.js')({ suffix: true });
|
||||
options = require('../utils/options.js');
|
||||
|
||||
var docOptions = {
|
||||
local: 'docs', // Generates the offline docs
|
||||
|
|
|
@ -21,5 +21,5 @@ gulp.task('load', ['clean:load'], function() {
|
|||
});
|
||||
|
||||
gulp.task('clean:load', function() {
|
||||
return del([ 'dist/paper-full.js', 'dist/paper-core.js', 'dist/node/**' ]);
|
||||
return del([ 'dist/*.js', 'dist/node/**' ]);
|
||||
});
|
||||
|
|
|
@ -15,14 +15,14 @@ var gulp = require('gulp'),
|
|||
git = require('gulp-git-streamed'),
|
||||
run = require('run-sequence'),
|
||||
shell = require('gulp-shell'),
|
||||
options = require('../utils/options.js')({ suffix: false });
|
||||
options = require('../utils/options.js');
|
||||
|
||||
gulp.task('publish', function() {
|
||||
if (options.branch !== 'develop') {
|
||||
throw new Error('Publishing is only allowed on the develop branch.');
|
||||
}
|
||||
return run(
|
||||
'publish:bump',
|
||||
'publish:version',
|
||||
'publish:dist',
|
||||
'publish:commit',
|
||||
'publish:release',
|
||||
|
@ -30,7 +30,10 @@ gulp.task('publish', function() {
|
|||
);
|
||||
});
|
||||
|
||||
gulp.task('publish:bump', function() {
|
||||
gulp.task('publish:version', function() {
|
||||
// Since we're executing this on the develop branch but we don't wan the
|
||||
// version suffixed, reset the version value again.
|
||||
options.resetVersion();
|
||||
return gulp.src([ 'package.json', 'component.json' ])
|
||||
.pipe(bump({ version: options.version }))
|
||||
.pipe(gulp.dest('.'));
|
||||
|
@ -58,6 +61,6 @@ gulp.task('publish:release', function() {
|
|||
gulp.task('publish:load', ['load'], function() {
|
||||
return gulp.src('dist')
|
||||
.pipe(git.add())
|
||||
.pipe(git.commit('Switch back to load.js versions for development.'))
|
||||
.pipe(git.commit('Switch back to load.js versions on develop branch.'))
|
||||
.pipe(git.push('origin', 'develop'));
|
||||
});
|
||||
|
|
|
@ -14,7 +14,6 @@ var gulp = require('gulp'),
|
|||
path = require('path'),
|
||||
gutil = require('gulp-util');
|
||||
|
||||
|
||||
gulp.task('watch', function () {
|
||||
gulp.watch('src/**/*.js', ['jshint'])
|
||||
.on('change', function(event) {
|
||||
|
|
|
@ -20,19 +20,20 @@ function git(command) {
|
|||
return execSync('git ' + command).toString().trim();
|
||||
}
|
||||
|
||||
options.date = git('log -1 --pretty=format:%ad');
|
||||
options.branch = git('rev-parse --abbrev-ref HEAD');
|
||||
|
||||
// Get the date of the last commit from this branch for release date:
|
||||
var date = git('log -1 --pretty=format:%ad'),
|
||||
branch = git('rev-parse --abbrev-ref HEAD');
|
||||
var version = options.version,
|
||||
branch = options.branch;
|
||||
|
||||
extend(options, {
|
||||
date: date,
|
||||
branch: branch,
|
||||
// If we're not on the master branch, use the branch name as a suffix:
|
||||
suffix: branch === 'master' ? '' : '-' + branch
|
||||
});
|
||||
// If we're not on the master branch, use the branch name as a suffix:
|
||||
if (branch !== 'master')
|
||||
options.version += '-' + branch;
|
||||
|
||||
module.exports = function(opts) {
|
||||
return extend({}, options, opts && opts.suffix && {
|
||||
version: options.version + options.suffix
|
||||
});
|
||||
};
|
||||
// Allow the removal of the suffix again, as needed by the publish task.
|
||||
options.resetVersion = function() {
|
||||
options.version = version;
|
||||
}
|
||||
|
||||
module.exports = options;
|
||||
|
|
Loading…
Reference in a new issue