pronamic / pronamic-cli

Pronamic CLI is the command-line interface for Pronamic.
1 stars 0 forks source link

Add "generate release notes" class/function/command #11

Open remcotolsma opened 1 year ago

remcotolsma commented 1 year ago

Currently we generate the release notes quite late in the version command:

The version command does several things, but this is not immediately clear to users beforehand.

  • git pull
  • Working tree status (git status)
  • git branch --show-current
  • Check tagnames without v prefix.'
  • Run Composer script preversion
  • Check composer.json type property.
  • Check composer outdated
  • Check non-comparable Composer package versions (dev-*)
  • Check package.json version property
  • Check WordPress plugin file headers from *.php files
  • Check multiple WordPress plugins in working directory
  • Ask user for bump method (patch, minor, major)
  • Compose changelog
  • Set plugin file header version
  • Set theme style.css header version
  • Set Stable tag in readme.txt header
  • Set version in package.json
  • Run Composer script version
  • Git commit changes (git commit)
  • Git tag (git tag)
  • Git push (git push)
  • Run Composer script postversion

https://github.com/pronamic/pronamic-cli/blob/33351cf6f659453489e06c1f2e7fa3f97df4d205/src/VersionCommand.php#L319-L393

It would be more convenient if we could generate and display the changelog before the "Ask user for bump method". Based on the generated changelog, a user can more easily choose the desired bump method.