-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3187 from martin-kolinek/sdist-build
Support building the sdist and upload tarball
- Loading branch information
Showing
42 changed files
with
553 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module Stack.Options.SDistParser where | ||
|
||
import Data.Monoid | ||
import Options.Applicative | ||
import Options.Applicative.Builder.Extra | ||
import Stack.SDist | ||
import Stack.Options.HpcReportParser (pvpBoundsOption) | ||
|
||
-- | Parser for arguments to `stack sdist` and `stack upload` | ||
sdistOptsParser :: Bool -- ^ Whether to sign by default `stack upload` does, `stack sdist` doesn't | ||
-> Parser SDistOpts | ||
sdistOptsParser signDefault = SDistOpts <$> | ||
many (strArgument $ metavar "DIR" <> completer dirCompleter) <*> | ||
optional pvpBoundsOption <*> | ||
ignoreCheckSwitch <*> | ||
(if signDefault | ||
then switch (long "no-signature" <> help "Do not sign & upload signatures") | ||
else switch (long "sign" <> help "Sign & upload signatures")) <*> | ||
strOption | ||
(long "sig-server" <> metavar "URL" <> showDefault <> | ||
value "https://sig.commercialhaskell.org" <> | ||
help "URL") <*> | ||
buildPackageOption | ||
where | ||
ignoreCheckSwitch = | ||
switch (long "ignore-check" | ||
<> help "Do not check package for common mistakes") | ||
buildPackageOption = | ||
boolFlags False "test-tarball" "building of the resulting tarball" idm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.