Skip to content

Commit aea6b89

Browse files
committed
fix(release): fix version number in build files
1 parent 0abefcc commit aea6b89

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

Gruntfile.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ module.exports = function (grunt) {
66
var replace = require('rollup-plugin-replace');
77
var build = require('./build.json');
88

9+
var exec = require('child_process').exec;
10+
911
grunt.initConfig({
1012

1113
// Import package manifest
@@ -205,9 +207,10 @@ module.exports = function (grunt) {
205207

206208
bump: {
207209
options: {
208-
files : ['package.json','bower.json'],
209-
commitFiles : ['-a'],
210-
pushTo : 'origin'
210+
files : ['package.json', 'bower.json'],
211+
commitFiles : ['-a'],
212+
pushTo : 'origin',
213+
updateConfigs: ['pkg']
211214
}
212215
}
213216
});
@@ -230,7 +233,13 @@ module.exports = function (grunt) {
230233
grunt.registerTask("build", ["clean", "build-emoji", "eslint", "rollup", "sass", "uglify", "string-replace", "postcss", "copy"]);
231234
grunt.registerTask("build-emoji", ["retinafy", "sprite", "sass"]);
232235
grunt.registerTask("dist", ["clean", "eslint", "rollup", "sass", "uglify", "string-replace", "postcss", "copy"]);
233-
grunt.registerTask("release", function(option){
234-
grunt.task.run(["bump-only:"+ option, "dist", "bump-commit"])
236+
grunt.registerTask("release", function (option) {
237+
grunt.task.run(["bump-only:" + option, "dist","changelog", "bump-commit"]);
238+
exec('npm publish', function (err, stdout, stderr) {
239+
if (err) {
240+
grunt.fatal('Can not publish to NPM:\n ' + stderr);
241+
}
242+
grunt.log.ok('Published to NPM ');
243+
});
235244
})
236245
};

dist/embed.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/embed.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)