Skip to content

Commit

Permalink
CPAN Release 0.20
Browse files Browse the repository at this point in the history
- Remove (c) from Copyright
- Move doc to swim
- Fix Meta and add Contributing
  • Loading branch information
ingydotnet committed Aug 4, 2014
1 parent 5087d71 commit ca2b421
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 47 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
7 changes: 7 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
55 changes: 55 additions & 0 deletions Contributing
Original file line number Diff line number Diff line change
@@ -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

148 changes: 110 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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/'
Expand All @@ -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
8 changes: 4 additions & 4 deletions Meta
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ReadMe.pod
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -317,7 +317,7 @@ Ingy döt Net <ingy@cpan.org>

=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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Ingy döt Net <ingy@cpan.org>

= 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.
Expand Down
2 changes: 1 addition & 1 deletion lib/Template/Toolkit/Simple.pm
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit ca2b421

Please sign in to comment.