Looks like `subprocess` raises `FileNotFound` when the requested binary
is not found in `$PATH`. Catch that so that tests are successfully
skipped when running Windows-only tests.
This allows direct introspection of `version.plist` files from zip
archives, such as the autopkg source zip downloaded by
`AutoPkgGitMaster.nupkg.recipe` from GitHub.
For zip files only, Versioner can also now optionally ignore a single
root directory, which faciliates content extraction from sources such as
GitHub source archives, which have a root directory:
`user-project-truncatedhash`. Since it's extremely difficult to know the
truncated hash ahead of time, `skip_single_root_dir` will interpret any
path as relative to it.
An exception is raised if there is more than one root directory in the
archive and the flag is set.
This processor creates chocolatey packages. It currently only supports
relatively simple packages, owing to its support classes which generate
build specifications also being relatively simple. Experience will tell
where additional improvements are necessary.
Chocolatey needs a couple different kinds of build files to specify how
and what to package:
* A `.nuspec` that describes basic package metadata such as version.
* A `chocolateyInstall.ps1` that is executed during package install.
This commit adds classes that wrap the generation for simple cases.
It was commented out in all usages. It actualy exists in the standard
library anyway should it be needed again. And, there was a stale and
confusing comment involving unit tests that implied fragility that
didn't exist.
There are several places where autopkg attempts to discover the location
of a utility, such as `curl`. This abstracts it so that on new
platforms, the discovery logic does not need to be changed in many
places.
Windows support introduces the possibility of files having different
line ending conventions. There are already examples of this in the
repository despite the macOS specific nature of the tool.
This commit fixes all existing instances of CRLF endings, and ensures
that no inconsistencies can be accidentally introduced later. Should the
need arise it will still be possible to commit a file with CRLF.