Commit 9bead321 authored by Alexis Williams's avatar Alexis Williams

Add new-sdist documentation [ci skip]

parent 8fe7607f
......@@ -478,6 +478,25 @@ and caches if the ``--save-config`` option is given, in which case it only remov
the build artefacts (``.hi``, ``.o`` along with any other temporary files generated
by the compiler, along with the build output).
cabal new-sdist
---------------
``cabal new-sdist [FLAGS] [TARGETS]`` takes the crucial files needed to build ``TARGETS``
and puts them into an archive format ready for upload to Hackage. These archives are stable
and two archives of the same format built from the same source will hash to the same value.
``cabal new-sdist`` takes the following flags:
- ``--list-only``: Rather than creating an archive, lists files that would be included.
Output is to ``stdout`` by default.
- ``--targz``: Output an archive in ``.tar.gz`` format.
- ``--zip``: Output an archive in ``.zip`` format.
- ``--output-dir``: Sets the output dir, if a non-default one is desired. The default is
``dist-newstyle/sdist/``.
Unsupported commands
--------------------
......@@ -488,9 +507,6 @@ The following commands are not currently supported:
Workaround: no good workaround at the moment. (But note that you no
longer need to install libraries before building!)
``cabal new-sdist``
Workaround: No good workaround at the moment. Use old ``sdist`` for now.
Configuring builds with cabal.project
=====================================
......
......@@ -167,7 +167,9 @@ sdistAction SdistFlags{..} targetStrings globalFlags = do
ZipFormat -> "zip"
outputPath pkg = case mOutputPath of
Just path -> path </> prettyShow (packageId pkg) <.> ext
Just path
| listSources -> path </> prettyShow (packageId pkg) <.> "list"
| otherwise -> path </> prettyShow (packageId pkg) <.> ext
Nothing
| listSources -> "-"
| otherwise -> distSdistFile distLayout (packageId pkg) archiveFormat
......
-*-change-log-*-
2.4.0.0 (current development version)
* Add 'new-sdist' command (#5389). Creates stable archives based on
cabal projects in '.zip' and '.tar.gz' formats.
* Add 'v1-' prefixes for the commands that will be replaced in the
new-build universe, in preparation for it becoming the default.
(#5358)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment