This repository was archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
How to release to CPAN
Masayuki Kozawa edited this page Oct 12, 2020
·
11 revisions
- Permission to create PR in the repo https://github.com/line/line-bot-sdk-perl/
- PAUSE account and co-maintainer permission of the distribution LINE-Bot-API
-
cpanm -nq App::cpm
- (sudo if it is required.)
-
cpm install -g Dist::Milla LWP::Protocol::https Dist::Zilla::Plugin::Test::Perl::Critic Test::Pod JSON::XS Furl::HTTP Test2::V0
- (sudo if it is required, too.)
-
milla setup
- It will ask you license and copyright holder, but they will be overwritten by
dist.ini
- It will ask you license and copyright holder, but they will be overwritten by
- Make sure the git remote named "origin" is exactly
[email protected]:line/line-bot-sdk-perl.git
. This is needed bymilla
If all preparation described above is done, run these commands:
git checkout release # it may requires -b
git merge master
milla release
- Then, on Github Release Tab, create a new "release" item with the newly-pushed tag. Paste the latest Change log as content.
- And create a P-R from release to master.
milla release
does a lot of leg work, roughly these:
- Promp for the version number (usually current version number + 0.01, but this can be arbitrary)
- Alter the version sting in .pm files
- Re-generate all the CPAN meta-data in
MANIFEST
,META.json
,META.yml
,README
- Build the tarball "tar.gz" with some generated "author tests" an run the test suite with "mill test"
- Commit the changes of meta-data to git repo
- Tag the latest status with the given version number
-
git push origin --tags
-- push the current branch as well as the new tags to remote. - Actually upload new tarball to CPAN after user confirmed on prompt.
When in doubt or trouble, you many want to examine the generate tarball without uploading it to CPAN. There are two options.
The first is running milla build
-- this generate a tarball without altering version number
The second is by running FAKE_RELEASE=1 milla release
-- this will run from step 1 to 7 -- but not 8. It'll produce a new tarball while also commit the machine-generated changes as well as push the new tags as the side-effect. If you exaime the tarball and decided not to upload it to CPAN, you'll also ned to delete the new git tags from both local and remote.