Commit 51fa09fe authored by Tino Goratsch's avatar Tino Goratsch

include the CHANGELOG inside the bump-version gulp task

parent 52df0ddf
......@@ -4,6 +4,7 @@
*/
const argv = require('yargs').argv;
const moment = require('moment');
module.exports = (gulp, plugins) => {
"use strict";
......@@ -52,6 +53,21 @@ module.exports = (gulp, plugins) => {
const from = getCurrentVersion();
const bumpedVersion = bumpVersion(from);
gulp.src(
[
'./CHANGELOG.md',
]
).pipe(plugins.change((content) => {
const currentDate = moment().format('YYYY-MM-DD');
return content
.replace('## [Unreleased]', `## [${bumpedVersion}] - ${currentDate}`)
.replace(
`[Unreleased]: https://gitlab.com/ACP3/cms/compare/v${from}...HEAD`,
`[Unreleased]: https://gitlab.com/ACP3/cms/compare/v${bumpedVersion}...HEAD\n` +
`[${bumpedVersion}]: https://gitlab.com/ACP3/cms/compare/v${from}...v${bumpedVersion}`
);
})).pipe(gulp.dest('./'));
return gulp.src(
[
'./ACP3/Core/composer.json',
......
......@@ -7,7 +7,7 @@ module.exports = function (gulp) {
'use strict';
return function () {
var nodeBasePath = './node_modules',
const nodeBasePath = './node_modules',
systemBasePath = './ACP3/Modules/ACP3/System/Resources/Assets',
ckeditorBasePath = './ACP3/Modules/ACP3/Wysiwygckeditor/Resources/Assets',
shareBasePath = './ACP3/Modules/ACP3/Share/Resources/Assets',
......@@ -59,9 +59,9 @@ module.exports = function (gulp) {
}
];
for (var i = 0; i < paths.length; i++) {
gulp.src(paths[i].src)
.pipe(gulp.dest(paths[i].dest));
for (const path of paths) {
gulp.src(path.src)
.pipe(gulp.dest(path.dest));
}
return 0;
......
Markdown is supported
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