Skip to content

Commit

Permalink
copy version file to piskel website
Browse files Browse the repository at this point in the history
  • Loading branch information
juliandescottes committed May 7, 2017
1 parent f74b081 commit 8c815f3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/copy-to-piskel-website.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const fse = require('fs-extra');
const PISKEL_PATH = path.resolve(__dirname, '..');
const PISKELAPP_PATH = path.resolve(__dirname, '../../piskel-website');

var pjson = require('../package.json');

// Callbacks sorted by call sequence.
function onCopy(err) {
if (err) {
Expand Down Expand Up @@ -52,6 +54,17 @@ function onDeleteTempPartial(err) {
}

console.log('Temporary main partial deleted...');

fs.writeFile(path.resolve(PISKELAPP_PATH, "static/editor/VERSION"), pjson.version, onVersionFileCreated);
}

function onVersionFileCreated(err) {
if (err) {
console.error('Failed to create temporary main partial...');
return console.error(err);
}

console.log('Version file created...');
console.log('Finished!');
}

Expand Down

0 comments on commit 8c815f3

Please sign in to comment.