changelog.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env node
  2. /**
  3. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  4. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  5. */
  6. /* eslint-env node */
  7. 'use strict';
  8. // In order to use the same version for all packages (including builds and ckeditor5 itself), you can call:
  9. // yarn run changelog [newVersion]
  10. const devEnv = require( '@ckeditor/ckeditor5-dev-env' );
  11. const commonOptions = {
  12. cwd: process.cwd(),
  13. packages: 'packages'
  14. };
  15. const editorBuildsGlob = '@ckeditor/ckeditor5-build-*';
  16. const optionsForDependencies = Object.assign( {}, commonOptions, {
  17. skipPackages: editorBuildsGlob,
  18. skipMainRepository: true
  19. } );
  20. const optionsForBuilds = Object.assign( {}, commonOptions, {
  21. scope: editorBuildsGlob
  22. } );
  23. Promise.resolve()
  24. .then( () => devEnv.generateChangelogForSubRepositories( optionsForDependencies ) )
  25. .then( response => devEnv.generateSummaryChangelog( Object.assign( optionsForBuilds, response ) ) )
  26. .then( () => {
  27. console.log( 'Done!' );
  28. } )
  29. .catch( err => {
  30. console.error( err.stack );
  31. } );