piano/grunt/rebrand.js

33 lines
794 B
JavaScript
Raw Normal View History

2014-11-08 17:52:36 +00:00
/*jshint node:true */
'use strict';
var rcedit = require('rcedit');
module.exports = function (grunt) {
grunt.registerMultiTask('rebrand', 'Rebrand .exe', function (platform) {
if (platform !== 'win') {
return;
}
var done = this.async();
rcedit(this.data.src, {
'icon': this.data.icon,
'version-string': this.data.meta
}, function (err) {
if (err) {
grunt.fail.warn(err);
return;
}
done();
});
});
grunt.config('rebrand.rebrand-exe', {
src: 'build/<%= paths.exe[grunt.task.current.args[0]] %>',
icon: 'images/logos/logo.ico',
meta: grunt.config.get('meta')
});
};