You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
916 B

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