cleanup
This commit is contained in:
@@ -37,49 +37,49 @@ execute('git diff --name-only ' + versionFrom, function (stdout) {
|
||||
fs.mkdirSync(upgradePath + '/files');
|
||||
}
|
||||
process.chdir(buildPath);
|
||||
|
||||
|
||||
var fileList = [];
|
||||
|
||||
|
||||
(stdout || '').split('\n').forEach(function (file) {
|
||||
if (file == '') {
|
||||
return;
|
||||
}
|
||||
fileList.push(file.replace('frontend/', ''));
|
||||
});
|
||||
|
||||
|
||||
fileList.push('client/espo.min.js');
|
||||
|
||||
|
||||
fileList.push('client/css/espo.min.css');
|
||||
fileList.push('client/css/bootstrap.css');
|
||||
|
||||
|
||||
fs.writeFileSync(diffFilePath, fileList.join('\n'));
|
||||
|
||||
|
||||
execute('git diff --name-only --diff-filter=D ' + versionFrom, function (stdout) {
|
||||
var deletedFileList = [];
|
||||
|
||||
|
||||
(stdout || '').split('\n').forEach(function (file) {
|
||||
if (file == '') {
|
||||
return;
|
||||
}
|
||||
deletedFileList.push(file.replace('frontend/', ''));
|
||||
});
|
||||
|
||||
|
||||
execute('xargs -a ' + diffFilePath + ' cp --parents -t ' + upgradePath + '/files ' , function (stdout) {
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
execute('xargs -a ' + diffFilePath + ' cp --parents -t ' + upgradePath + '/files ' , function (stdout) {
|
||||
|
||||
});
|
||||
|
||||
var d = new Date();
|
||||
|
||||
|
||||
var monthN = ((d.getMonth() + 1).toString());
|
||||
monthN = monthN.length == 1 ? '0' + monthN : monthN;
|
||||
|
||||
|
||||
var dateN = d.getDate().toString();
|
||||
dateN = dateN.length == 1 ? '0' + dateN : dateN;
|
||||
|
||||
|
||||
var date = d.getFullYear().toString() + '-' + monthN + '-' + dateN.toString();
|
||||
|
||||
execute('git tag', function (stdout) {
|
||||
|
||||
execute('git tag', function (stdout) {
|
||||
var versionList = [];
|
||||
var occured = false;
|
||||
tagList = stdout.split('\n').forEach(function (tag) {
|
||||
@@ -93,25 +93,25 @@ execute('git diff --name-only ' + versionFrom, function (stdout) {
|
||||
versionList.push(tag);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var manifest = {
|
||||
"name": "EspoCRM Upgrade "+acceptedVersionName+" to "+version,
|
||||
"type": "upgrade",
|
||||
"version": version,
|
||||
"acceptableVersions": versionList,
|
||||
"releaseDate": date,
|
||||
"author": "EspoCRM",
|
||||
"author": "EspoCRM",
|
||||
"description": "",
|
||||
"delete": deletedFileList
|
||||
}
|
||||
|
||||
|
||||
fs.writeFileSync(upgradePath + '/manifest.json', JSON.stringify(manifest, null, ' '));
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
fs.unlinkSync(diffFilePath)
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user