Commit 2fd7699c authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[BUGFIX] fix release task

parent 3c33ac97
......@@ -42,9 +42,8 @@ module.exports = class Open extends Task {
composerFile = require(pathToComposer),
currentVersion = composerFile.version,
nextVersionNumber = this._getNextVersionNumber(answers, currentVersion);
this._updateComposerJson(currentVersion, nextVersionNumber, pathToComposer).then(() => {
this._updateExtEmconf(currentVersion, nextVersionNumber, pathToExtEmconf)
});
await Open._updateComposerJson(currentVersion, nextVersionNumber, pathToComposer);
await Open._updateExtEmconf(currentVersion, nextVersionNumber, pathToExtEmconf);
} catch (error) {
this._logger.error('Could not open file!');
}
......@@ -57,7 +56,7 @@ module.exports = class Open extends Task {
* Determines the next version number
*
* @param {Object} answers The answers to the questions from inquirer
* @param {String} currentVersion The curent version number
* @param {String} currentVersion The current version number
*/
_getNextVersionNumber(answers, currentVersion) {
let numbers = currentVersion.split('.');
......@@ -80,8 +79,10 @@ module.exports = class Open extends Task {
* @param {String} currentVersion The current version
* @param {String} newVersion The new version
* @param {String} path The path to the composer.json file
*
* @return {Promise}
*/
_updateComposerJson(currentVersion, newVersion, path) {
static async _updateComposerJson(currentVersion, newVersion, path) {
return replace({
files: path,
from: `"version": "${currentVersion}"`,
......@@ -95,8 +96,10 @@ module.exports = class Open extends Task {
* @param {String} currentVersion The current version
* @param {String} newVersion The new version
* @param {String} path The path to the ext_emconf.php file
*
* @return {Promise}
*/
_updateExtEmconf(currentVersion, newVersion, path) {
static async _updateExtEmconf(currentVersion, newVersion, path) {
return replace({
files: path,
from: `'version' => '${currentVersion}'`,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment