name    = Algorithm-AM
author  = Theron Stanford <shixilun@yahoo.com>, Nathan Glenn <garfieldnate@gmail.com>
license = Perl_5
copyright_holder = Royal Skousen
copyright_year   = 2013

[ReportPhase / Phase_Begins] 	; report on everything

; -- start off by bumping the version

; find the last tag, and bump to next version via Version::Next;
; if you need a different version number, set the V env. variable
[Git::NextVersion]
first_version = 2.31            ; start with this version
version_regexp  = ^v(.+)$       ; this is the default

; -- basic dist skeleton

[GatherDir]                     ; we start with everything in the dist dir
[PruneCruft]                    ; automatically prune cruft defined by RJBS
[AutoPrereqs]                   ; automatically find our prereqs
[GenerateFile / MANIFEST.SKIP]  ; make our default MANIFEST.SKIP
filename = MANIFEST.SKIP
content = #!include_default
content =
content = # sublime project
content = \.sublime-project
content = \.sublime-workspace
content =
content = #Eclipse project
content = \.includepath$
content = \.project$
content = \.settings/
content =
content = # our tarballs
content = \.tar\.gz$
content = ^releases/
content = ^TODO\.txt
content =
content = # Need for passing release tests (xs generated fiels)
content = AM\.bs
content = AM\.c
content = AM\.def
content = AM\.o
content = dll\.base
content = dll\.exp
[ManifestSkip]                  ; auto-generate MANIFEST.SKIP and don't put any cruft in the build
skipfile = MANIFEST.SKIP

; -- Generate tons of tests

[ReportVersions::Tiny]          ; report module versions used during installation
[Test::Compile]                 ; Create a t/00-compile.t file that auto-compiles every module in the dist
fake_home = 1                   ; fakes $ENV{HOME} just in case (for cpan smoke testers)
[Test::Perl::Critic]
critic_config = t/perlcriticrc
[Test::DistManifest]            ; tests correctness of the manifest
[Test::Version]                 ; makes sure there's a version
is_strict   = 0
has_version = 1
[MetaTests]                     ; test meta.yml
[Test::CPAN::Meta::JSON]        ; test meta.json
[Test::MinimumVersion]          ; tests for a minimum version
[MojibakeTests]                 ; test file encodings
[PodCoverageTests]              ; test pod coverage
[PodSyntaxTests]                ; test pod syntax
[Test::Portability]             ; test portability of file names
[Test::Synopsis]                ; make sure the synopsis is compilable ;doesn't work with heredocs
[Test::UnusedVars]              ; find unused variables
[Test::Pod::LinkCheck]          ; find broken links
[Test::CPAN::Changes]           ; test changelog conformance to CPAN standards
; [Test::EOL]                     ; Bad for Windows. TODO: find something else for trailing space
[Test::Kwalitee]				; check kwalitee metric

; -- munge files

[Prepender]                     ; automatically add lines following the shebang in modules
copyright = 1
[OurPkgVersion]					; "our $VERSION = $version" in main module
[PodWeaver]                     ; weave our POD and add useful boilerplate
; config_plugin = @Apocalyptic
; [LocaleMsgfmt]                  ; compile .po files to .mo files in share/locale
; locale = share/locale

; update the Changelog
[NextRelease]
time_zone = local
filename = Changes

; -- generate/process meta-information

[ExecDir]                       ; automatically install files from bin/ directory as executables ( if it exists )
dir = bin
[ShareDir]                      ; automatically install File::ShareDir files from share/ ( if it exists )
dir = share
[MinimumPerl]                   ; automatically find the minimum perl version required and add it to prereqs
[Bugtracker]                    ; set bugtracker to http://rt.cpan.org/Public/Dist/Display.html?Name=$dist
[Homepage]                      ; set homepage to http://search.cpan.org/dist/$dist/
[MetaConfig]                    ; dump dzil config into metadata
[MetaData::BuiltWith]           ; dump entire perl modules we used to build into metadata
[Repository]                    ; set git repository path by looking at git configs
git_remote = origin
[MetaResources]                 ; add arbitrary resources to metadata
license = http://dev.perl.org/licenses/

; generate meta files
[MetaNoIndex]                   ; tell PAUSE to not index those directories
directory = inc t xt examples share eg mylib
[MetaProvides::Package]         ; get provides from package definitions in files
meta_noindex = 1
[License]                       ; create LICENSE file
[MakeMaker]                     ; create Makefile.PL file
;TODO: project setup makes Module::Build impossible. Does it even matter?
; [ModuleBuild]                   ; create Build.PL file
; [DualBuilders]                  ; have M::B and EU::MM but select only M::B as prereq
; prefer = build
[MetaYAML]                      ; create META.yml file
[GithubMeta]                    ; include Git info in Meta.yml
[MetaJSON]                      ; create META.json file
[ReadmeFromPod]                 ; create README file in build
[ReadmeAnyFromPod]              ; create markdown README file in the project root
type = markdown
location = root
[InstallGuide]                  ; create INSTALL file
; Windows: install gpg4win
[Signature]                     ; create SIGNATURE file whenever we create an archive
sign = archive
[Manifest]                      ; create the MANIFEST file

; -- pre-release

; Perform Git operations after a release or build
; [Git::Check]                    ; check for a clean state before release; always fails because build adds new files

[CheckChangesHasContent]        ; make sure you explained your changes :)
changelog = Changes
[TestRelease]                   ; make sure that we won't release a FAIL distro
[CheckPrereqsIndexed]           ; make sure that our prereqs actually exist on CPAN
[ConfirmRelease]                ; double-check that we ACTUALLY want a release

; -- test

[RunExtraTests]                 ; run the xt/ tests when `dzil test --release` is run

; -- release

[UploadToCPAN]                  ; upload your dist to CPAN using CPAN::Uploader

; -- post-release
[ArchiveRelease]                ; archive our tarballs under releases/
directory = releases

[Clean]                         ; run dzil clean so we have/commit no cruft

[Git::Commit]                   ; commit the dzil-generated stuff (allow_dirty means commit it)
allow_dirty = README.mkdn
allow_dirty = Changes
allow_dirty = dist.ini
commit_msg = New CPAN release of %N - v%v%n%n%c
add_files_in = releases         ; add our release tarballs to the repo

; commit released results
; [Git::CommitBuild]
; build =
; release_branch = master

[Git::Tag]                      ; tag our new release
tag_format = v%v
; branch = releases
tag_message = Tagged release %v
[Git::Push]                     ; automatically push to the "origin" defined in .git/config
push_to = origin

[ReportPhase / Phase_Ends]