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 { ...@@ -42,9 +42,8 @@ module.exports = class Open extends Task {
composerFile = require(pathToComposer), composerFile = require(pathToComposer),
currentVersion = composerFile.version, currentVersion = composerFile.version,
nextVersionNumber = this._getNextVersionNumber(answers, currentVersion); nextVersionNumber = this._getNextVersionNumber(answers, currentVersion);
this._updateComposerJson(currentVersion, nextVersionNumber, pathToComposer).then(() => { await Open._updateComposerJson(currentVersion, nextVersionNumber, pathToComposer);
this._updateExtEmconf(currentVersion, nextVersionNumber, pathToExtEmconf) await Open._updateExtEmconf(currentVersion, nextVersionNumber, pathToExtEmconf);
});
} catch (error) { } catch (error) {
this._logger.error('Could not open file!'); this._logger.error('Could not open file!');
} }
...@@ -57,7 +56,7 @@ module.exports = class Open extends Task { ...@@ -57,7 +56,7 @@ module.exports = class Open extends Task {
* Determines the next version number * Determines the next version number
* *
* @param {Object} answers The answers to the questions from inquirer * @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) { _getNextVersionNumber(answers, currentVersion) {
let numbers = currentVersion.split('.'); let numbers = currentVersion.split('.');
...@@ -80,8 +79,10 @@ module.exports = class Open extends Task { ...@@ -80,8 +79,10 @@ module.exports = class Open extends Task {
* @param {String} currentVersion The current version * @param {String} currentVersion The current version
* @param {String} newVersion The new version * @param {String} newVersion The new version
* @param {String} path The path to the composer.json file * @param {String} path The path to the composer.json file
*
* @return {Promise}
*/ */
_updateComposerJson(currentVersion, newVersion, path) { static async _updateComposerJson(currentVersion, newVersion, path) {
return replace({ return replace({
files: path, files: path,
from: `"version": "${currentVersion}"`, from: `"version": "${currentVersion}"`,
...@@ -95,8 +96,10 @@ module.exports = class Open extends Task { ...@@ -95,8 +96,10 @@ module.exports = class Open extends Task {
* @param {String} currentVersion The current version * @param {String} currentVersion The current version
* @param {String} newVersion The new version * @param {String} newVersion The new version
* @param {String} path The path to the ext_emconf.php file * @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({ return replace({
files: path, files: path,
from: `'version' => '${currentVersion}'`, 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