Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Toolchain
sgc
Commits
2fd7699c
Commit
2fd7699c
authored
Sep 10, 2018
by
Philipp Nowinski
Browse files
[BUGFIX] fix release task
parent
3c33ac97
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/tasks/releaseExtension.js
View file @
2fd7699c
...
...
@@ -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 cur
r
ent 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
}
'`
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment