티스토리 수익 글 보기
{{ message }}
Add changelog generator script #51
Merged
+14,672
−796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #41
This PR takes over the code from Gutenberg’s changelog generator script to this repository, with a few adjustments for our purposes. Overall, our implementation can be a bit simpler than theirs since we don’t have as many labels and complex requirements to our changelog – at least not yet 🙂
In order to test this PR, pull the branch and run the following command (make sure to update dependencies first):
You can provide any milestone title as argument, but the above is the only one we have so far (see https://github.com/WordPress/performance/milestones).
The above should give an output like the following (which can later be directly copied/pasted into the
readme.txtfile):Our milestones will eventually be named with actual versions, i.e. instead of
= Initial plugin release =the output would start with something like= 1.0.0 =.More in-depth overview of the changes:
bin/pluginfolder withcli.jsentrypoint to the plugin’s CLI framework.bin/plugin/commands/changelog.jswith the implementation of the changelog command. That is going to be the only command we need for now.--milestoneor-margument is required in our case.[Type] xyzlabel.[Focus] xyzlabel) or the word “Infrastructure” (fromInfrastructurelabel).readme.txtformat (which Gutenberg is not using for its changelog, it uses regular Markdown instead).bin/plugin/libfolder with some common utility functions.npm run changelogscript that calls the above changelog command via the new CLI tool.@wordpress/scriptspackage, withformat-jsandlint-jscommands.binfolder, which at this point are the only JS files in the entire project.devDependenciestopackage.json.