Alien-ckdl
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
));
sub MY::postamble {
my $abmm_postamble = $abmm->mm_postamble;
my $release_postamble = <<'MAKE_FRAG';
# --- Release target -------------------------------------------------
# Usage: make release
#
# Builds and tests the dist tarball via `make disttest`, then uploads
# it to CPAN with cpan-upload (from CPAN::Uploader). Refuses to run
# if the git working tree is dirty or if a tag for the current
# $(VERSION) already exists. See RELEASING.md.
.PHONY: release release-check
release-check :
@git diff-index --quiet HEAD -- || { \
echo "ERROR: git working tree is dirty; commit or stash first."; \
exit 1; \
}
@if git rev-parse -q --verify "refs/tags/v$(VERSION)" >/dev/null; then \
echo "ERROR: tag v$(VERSION) already exists; bump \$$VERSION in lib/Alien/ckdl.pm."; \
exit 1; \
fi
@command -v cpan-upload >/dev/null 2>&1 || { \
echo "ERROR: cpan-upload not found in PATH; cpanm CPAN::Uploader"; \
exit 1; \
}
@test -r $(HOME)/.pause || { \
echo "ERROR: ~/.pause not found; see RELEASING.md for the format."; \
exit 1; \
}
release :: release-check disttest
cpan-upload $(DISTVNAME).tar.gz
@echo
@echo "Uploaded $(DISTVNAME).tar.gz to PAUSE."
@echo "Next:"
@echo " git commit -am 'Release v$(VERSION)'"
@echo " git tag v$(VERSION)"
@echo " git push --follow-tags"
MAKE_FRAG
return $abmm_postamble . $release_postamble;
}
RELEASING.md view on Meta::CPAN
# Releasing Alien::ckdl to CPAN
This dist uses plain `ExtUtils::MakeMaker` plus
[`cpan-upload`](https://metacpan.org/pod/cpan-upload) (from
`CPAN::Uploader`). No Dist::Zilla, no Minilla, no surprises.
## Per-release checklist
1. Make sure the working tree is clean and on `master`:
```sh
git status
git pull --ff-only
```
RELEASING.md view on Meta::CPAN
4. Sanity-build from a clean slate:
```sh
make distclean 2>/dev/null || true
perl Makefile.PL
make
make test
```
5. Cut and upload the release:
```sh
make release
```
The `release` target:
- Runs `make disttest` (builds the tarball, unpacks it, configures
it, and runs its tests - this is what catches missing
`MANIFEST` entries before they reach CPAN).
- Refuses to proceed if the git working tree is dirty.
- Refuses to proceed if a tag `v$(VERSION)` already exists.
- Runs `cpan-upload` on the freshly built tarball.
6. Tag and push:
```sh
git commit -am "Release v$(perl -Ilib -MAlien::ckdl -e 'print $Alien::ckdl::VERSION')"
git tag "v$(perl -Ilib -MAlien::ckdl -e 'print $Alien::ckdl::VERSION')"
git push --follow-tags
```
7. Wait ~1 hour, then verify on
[MetaCPAN](https://metacpan.org/dist/Alien-ckdl).
## Recovery
- **Upload failed mid-way.** `cpan-upload` is idempotent against PAUSE
re-uploads of the *same* tarball; just run `make release` again.
- **Uploaded a broken release.** You have 72 hours to delete it from
PAUSE via the web UI (`https://pause.perl.org/` -> "Delete
Files"). After that it's permanent in the BackPAN archive. Either
way, **never reuse a version number** - bump and re-release.
- **Forgot to bump `$VERSION`.** The `release` target's "tag already
exists" guard will catch this on the second run, but the tarball
will already exist locally. Delete it (`rm Alien-ckdl-*.tar.gz`),
bump the version, and start over.
## Notes on Alien-specific concerns
( run in 2.307 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )