arnaucube
arnaucube/commonroutesAppPublic Self-hosted repository
commonroutesApp/www/lib/ui-leaflet/grunt/conventionalChangelog.js
www/lib/ui-leaflet/grunt/conventionalChangelog.jsRaw
 1'use strict';
 2var _pkg = require('../package.json');
 3var argv = require('yargs').argv;
 4
 5/*
 6 _pkg.nextVersion only works for patch updates
 7
 8 Using changelog in the workflow is not really recommended right now as changelog is not really able to be modified until
 9 a new tag is released.
10
11 Using Yargs as a workaround which grunt should be used in this way:
12
13 `grunt changelog --ui_leaflet_ver SOME_TAG_NUMBER`
14 */
15
16module.exports = function (grunt, options) {
17    console.log('version:', argv.ui_leaflet_ver || _pkg.version);
18    return {
19        options: {
20            changelogOpts: {
21                // conventional-changelog options go here
22                preset: 'angular',
23                releaseCount: 0
24            },
25            context: {
26                currentTag: 'v' + (argv.ui_leaflet_ver || _pkg.version)
27            }
28        },
29        release: {
30            src: 'CHANGELOG.md'
31        }
32    };
33};