From ca2b421fadd6e252a3eba3ca20c8c709be5713ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Mon, 4 Aug 2014 00:35:42 -0700 Subject: [PATCH] CPAN Release 0.20 - Remove (c) from Copyright - Move doc to swim - Fix Meta and add Contributing --- .travis.yml | 8 + Changes | 7 + Contributing | 55 +++++++ Makefile | 148 +++++++++++++----- Meta | 8 +- ReadMe.pod | 6 +- .../Toolkit/{Simple.kwim => Simple.swim} | 2 +- lib/Template/Toolkit/Simple.pm | 2 +- 8 files changed, 189 insertions(+), 47 deletions(-) create mode 100644 Contributing rename doc/Template/Toolkit/{Simple.kwim => Simple.swim} (99%) diff --git a/.travis.yml b/.travis.yml index fd8ac9f..db4d167 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,14 @@ +# DO NOT EDIT +# +# This .travis.yml file generated by Zilla::Dist. To upgrade it, run: +# +# > make update +# + language: perl perl: +- '5.20' - '5.18' - '5.16' - '5.14' diff --git a/Changes b/Changes index 8897e18..420a0a8 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,11 @@ --- +version: 0.20 +date: Mon Aug 4 00:35:28 PDT 2014 +changes: +- Remove (c) from Copyright +- Move doc to swim +- Fix Meta and add Contributing +--- version: 0.19 date: Wed Jun 18 11:23:29 PDT 2014 changes: diff --git a/Contributing b/Contributing new file mode 100644 index 0000000..effd3a9 --- /dev/null +++ b/Contributing @@ -0,0 +1,55 @@ +Contributing +============ + +The "Template-Toolkit-Simple" Project needs your help! + +Please consider being a contributor. This file contains instructions that will +help you be an effective contributor to the Project. + +GitHub +------ + +The code for this Project is hosted at GitHub. The repository is: + + https://github.com/ingydotnet/template-toolkit-simple-pm + +You can get the code with this command: + + git clone https://github.com/ingydotnet/template-toolkit-simple-pm + +If you've found a bug or a missing feature that you would like the author to +know about, report it here: + + https://github.com/ingydotnet/template-toolkit-simple-pm/issues + +or fix it and submit a pull request here: + + https://github.com/ingydotnet/template-toolkit-simple-pm/pulls + +See these links for help on interacting with GitHub: + +* https://help.github.com/ +* https://help.github.com/articles/creating-a-pull-request + +Zilla::Dist +----------- + +This Project uses Zilla::Dist to prepare it for publishing to CPAN. Read: + + https://metacpan.org/pod/distribution/Zilla-Dist/lib/Zilla/Dist/Contributing.pod + +for up-to-date instructions on what contributors like yourself need to know to +use it. + +IRC +--- + +Template-Toolkit-Simple has an IRC channel where you can find real people to help you: + + irc.perl.org#tt + +Join the channel. Join the team! + + + Thanks in advance, Ingy döt net + diff --git a/Makefile b/Makefile index 2c8fdbd..723005d 100644 --- a/Makefile +++ b/Makefile @@ -7,15 +7,28 @@ .PHONY: cpan test -ifeq (,$(shell which zild)) - $(error "Error: 'zild' command not found. Please install Zilla::Dist from CPAN") +PERL ?= $(shell which perl) +ZILD := $(PERL) -S zild + +ifneq (,$(shell which zild)) + NAMEPATH := $(shell $(ZILD) meta =cpan/libname) +ifeq (,$(NAMEPATH)) + NAMEPATH := $(shell $(ZILD) meta name) +endif + NAME := $(shell $(ZILD) meta name) + VERSION := $(shell $(ZILD) meta version) + RELEASE_BRANCH := $(shell $(ZILD) meta branch) +else + NAME := No-Name + NAMEPATH := $(NAME) + VERSION := 0 + RELEASE_BRANCH := master endif -NAME := $(shell zild meta name) -VERSION := $(shell zild meta version) DISTDIR := $(NAME)-$(VERSION) DIST := $(DISTDIR).tar.gz -NAMEPATH := $(subst -,/,$(NAME)) +NAMEPATH := $(subst -,/,$(NAMEPATH)) +SUCCESS := "$(DIST) Released!!!" default: help @@ -24,8 +37,10 @@ help: @echo 'Makefile targets:' @echo '' @echo ' make test - Run the repo tests' - @echo ' make install - Install the repo' + @echo ' make install - Install the dist from this repo' + @echo ' make prereqs - Install the CPAN prereqs' @echo ' make update - Update generated files' + @echo ' make release - Release the dist to CPAN' @echo '' @echo ' make cpan - Make cpan/ dir with dist.ini' @echo ' make cpanshell - Open new shell into new cpan/' @@ -36,94 +51,151 @@ help: @echo ' make distshell - Open new shell into new distdir' @echo ' make disttest - Run the dist tests' @echo '' - @echo ' make release - Release the dist to CPAN' - @echo ' make preflight - Dryrun of release' - @echo '' + @echo ' make upgrade - Upgrade the build system (Makefile)' @echo ' make readme - Make the ReadMe.pod file' @echo ' make travis - Make a travis.yml file' - @echo ' make upgrade - Upgrade the build system' + @echo ' make uninstall - Uninstall the dist from this repo' @echo '' @echo ' make clean - Clean up build files' + @echo ' make help - Show this help' @echo '' test: - prove -lv test +ifeq ($(wildcard pkg/no-test),) + $(PERL) -S prove -lv test +else + @echo "Testing not available. Use 'disttest' instead." +endif install: distdir + @echo '***** Installing $(DISTDIR)' (cd $(DISTDIR); perl Makefile.PL; make install) make clean +prereqs: + cpanm `$(ZILD) meta requires` + update: makefile - make readme travis version + @echo '***** Updating/regenerating repo content' + make readme contrib travis version webhooks + +release: + make self-install + make clean + make update + make check-release + make date + make test + make disttest + @echo '***** Releasing $(DISTDIR)' + make dist + cpan-upload $(DIST) + make clean + [ -z "$$(git status -s)" ] || zild-git-commit + git push + git tag $(VERSION) + git push --tag + make clean + git status + @echo + @[ -n "$$(which cowsay)" ] && cowsay "$(SUCCESS)" || echo "$(SUCCESS)" + @echo cpan: + @echo '***** Creating the `cpan/` directory' zild-make-cpan cpanshell: cpan + @echo '***** Starting new shell in `cpan/` directory' (cd cpan; $$SHELL) make clean cpantest: cpan - (cd cpan; prove -lv t) && make clean +ifeq ($(wildcard pkg/no-test),) + @echo '***** Running tests in `cpan/` directory' + (cd cpan; $(PERL) -S prove -lv t) && make clean +else + @echo "Testing not available. Use 'disttest' instead." +endif dist: clean cpan + @echo '***** Creating new dist: $(DIST)' (cd cpan; dzil build) mv cpan/$(DIST) . rm -fr cpan distdir: clean cpan + @echo '***** Creating new dist directory: $(DISTDIR)' (cd cpan; dzil build) mv cpan/$(DIST) . tar xzf $(DIST) rm -fr cpan $(DIST) distshell: distdir + @echo '***** Starting new shell in `$(DISTDIR)` directory' (cd $(DISTDIR); $$SHELL) make clean disttest: cpan + @echo '***** Running tests in `$(DISTDIR)` directory' (cd cpan; dzil test) && make clean -release: clean update check-release test disttest - make dist - cpan-upload $(DIST) - git push - git tag $(VERSION) - git push --tag - make clean - git status - -preflight: clean update check-release test disttest - make dist - @echo cpan-upload $(DIST) - @echo git push - @echo git tag $(VERSION) - @echo git push --tag - make clean - git status +upgrade: + @echo '***** Checking that Zilla-Dist Makefile is up to date' + cp `$(ZILD) sharedir`/Makefile ./ readme: - kwim --pod-cpan doc/$(NAMEPATH).kwim > ReadMe.pod + swim --pod-cpan doc/$(NAMEPATH).swim > ReadMe.pod + +contrib: + $(PERL) -S zild-render-template Contributing travis: - zild-make-travis + $(PERL) -S zild-render-template travis.yml .travis.yml -upgrade: - cp `zild sharedir`/Makefile ./ +uninstall: distdir + (cd $(DISTDIR); perl Makefile.PL; make uninstall) + make clean clean purge: rm -fr cpan .build $(DIST) $(DISTDIR) +#------------------------------------------------------------------------------ +# Non-pulic-facing targets: #------------------------------------------------------------------------------ check-release: - zild-check-release - + @echo '***** Checking readiness to release $(DIST)' + RELEASE_BRANCH=$(RELEASE_BRANCH) zild-check-release + git stash + git pull --rebase origin $(RELEASE_BRANCH) + git stash pop + +# We don't want to update the Makefile in Zilla::Dist since it is the real +# source, and would be reverting to whatever was installed. ifeq (Zilla-Dist,$(NAME)) makefile: @echo Skip 'make upgrade' + +self-install: install + [ -n "which plenv" ] && plenv rehash else -makefile: upgrade +makefile: + @cp Makefile /tmp/ + make upgrade + @if [ -n "`diff Makefile /tmp/Makefile`" ]; then \ + echo "ATTENTION: Dist-Zilla Makefile updated. Please re-run the command."; \ + exit 1; \ + fi + @rm /tmp/Makefile + +self-install: endif +date: + $(ZILD) changes date "`date`" + version: - zild-version-update + $(PERL) -S zild-version-update + +webhooks: + $(PERL) -S zild webhooks diff --git a/Meta b/Meta index f7dd320..f1aa9c8 100644 --- a/Meta +++ b/Meta @@ -1,7 +1,7 @@ =meta: 0.0.1 name: Template-Toolkit-Simple -version: 0.19 +version: 0.20 abstract: A Simple Interface to Template Toolkit homepage: https://metacpan.org/release/Template-Toolkit-Simple @@ -25,9 +25,9 @@ recommends: XML::Simple: 0 devel: - git: git@github.org/ingydotnet/template-toolkit-simple-pm - irc: irc.perl.org/tt - bug: https://github.com/ingydotnet/template-toolkit-simple-pm/issues/ + git: https://github.com/ingydotnet/template-toolkit-simple-pm + bug: https://github.com/ingydotnet/template-toolkit-simple-pm/issues + irc: irc.perl.org#tt =cpan: include_testml: 1 diff --git a/ReadMe.pod b/ReadMe.pod index caa6eff..51a5d6e 100644 --- a/ReadMe.pod +++ b/ReadMe.pod @@ -1,8 +1,8 @@ =pod =for comment -DO NOT EDIT. This Pod was generated by Kwim. -See http://github.com/ingydotnet/kwim-pm#readme +DO NOT EDIT. This Pod was generated by Swim. +See http://github.com/ingydotnet/swim-pm#readme =encoding utf8 @@ -317,7 +317,7 @@ Ingy döt Net =head1 COPYRIGHT AND LICENSE -Copyright (c) 2008-2014. Ingy döt Net. +Copyright 2008-2014. Ingy döt Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/doc/Template/Toolkit/Simple.kwim b/doc/Template/Toolkit/Simple.swim similarity index 99% rename from doc/Template/Toolkit/Simple.kwim rename to doc/Template/Toolkit/Simple.swim index fcf233a..289c3a2 100644 --- a/doc/Template/Toolkit/Simple.kwim +++ b/doc/Template/Toolkit/Simple.swim @@ -220,7 +220,7 @@ Ingy döt Net = Copyright and License -Copyright (c) 2008-2014. Ingy döt Net. +Copyright 2008-2014. Ingy döt Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/Template/Toolkit/Simple.pm b/lib/Template/Toolkit/Simple.pm index f195191..146e62b 100644 --- a/lib/Template/Toolkit/Simple.pm +++ b/lib/Template/Toolkit/Simple.pm @@ -1,6 +1,6 @@ use strict; use warnings; package Template::Toolkit::Simple; -our $VERSION = '0.19'; +our $VERSION = '0.20'; use Encode; use Getopt::Long;