stack-3.7.1: The Haskell Tool Stack
LicenseBSD-3-Clause
Safe HaskellNone
LanguageGHC2021

Stack.Upload

Description

Types and functions related to Stack's upload command.

Synopsis

Upload

data UploadOpts Source #

Type representing command line options for the stack upload command.

Constructors

UploadOpts 

Fields

data SDistOpts Source #

Type representing command line options for stack sdist command.

Constructors

SDistOpts 

Fields

data UploadContent Source #

Type representing forms of content for upload to Hackage.

Constructors

SDist

Content in the form of an sdist tarball.

DocArchive

Content in the form of an archive file of package documentation.

data UploadVariant Source #

Type representing variants for uploading to Hackage.

Constructors

Publishing

Publish the package/a published package.

Candidate

Create a package candidate/a package candidate.

uploadCmd :: UploadOpts -> RIO Runner () Source #

Function underlying the stack upload command. Upload to Hackage.

upload Source #

Arguments

:: (HasLogFunc m, HasTerm m) 
=> String

Hackage base URL

-> HackageAuth 
-> UploadContent 
-> Maybe String

Optional package identifier name, applies only to the upload of documentation.

-> FilePath

Path to archive file.

-> UploadVariant 
-> RIO m () 

Upload a single tarball with the given Uploader.

Since 0.1.0.0

uploadBytes Source #

Arguments

:: HasTerm m 
=> String

Hackage base URL

-> HackageAuth 
-> UploadContent

Form of the content to be uploaded.

-> Maybe String

Optional package identifier name, applies only to the upload of documentation.

-> String

tar file name

-> UploadVariant 
-> ByteString

tar file contents

-> RIO m () 

Upload a single tarball with the given Uploader. Instead of sending a file like upload, this sends a lazy bytestring.

Since 0.1.2.1

uploadRevision Source #

Arguments

:: (HasLogFunc m, HasTerm m) 
=> String

Hackage base URL

-> HackageAuth 
-> PackageIdentifier 
-> ByteString 
-> RIO m () 

Upload a revised Cabal file for the given package.

Credentials

data HackageCreds Source #

Username and password to log into Hackage.

Since 0.1.0.0

Instances

Instances details
ToJSON HackageCreds Source # 
Instance details

Defined in Stack.Upload

Show HackageCreds Source # 
Instance details

Defined in Stack.Upload

Methods

showsPrec :: Int -> HackageCreds -> ShowS

show :: HackageCreds -> String #

showList :: [HackageCreds] -> ShowS

Eq HackageCreds Source # 
Instance details

Defined in Stack.Upload

FromJSON (FilePath -> HackageCreds) Source # 
Instance details

Defined in Stack.Upload

data HackageAuth Source #

Type representing Hackage authentifications

Constructors

HAKey HackageKey

With a Hackage API authentification token registered by a user.

HACreds HackageCreds

With a Hackage user's credentials.

Instances

Instances details
Show HackageAuth Source # 
Instance details

Defined in Stack.Upload

Methods

showsPrec :: Int -> HackageAuth -> ShowS

show :: HackageAuth -> String #

showList :: [HackageAuth] -> ShowS

Eq HackageAuth Source # 
Instance details

Defined in Stack.Upload

newtype HackageKey Source #

Type representing Hackage API authentification tokens.

Constructors

HackageKey Text 

Instances

Instances details
Show HackageKey Source # 
Instance details

Defined in Stack.Upload

Methods

showsPrec :: Int -> HackageKey -> ShowS

show :: HackageKey -> String #

showList :: [HackageKey] -> ShowS

Eq HackageKey Source # 
Instance details

Defined in Stack.Upload

loadAuth :: (HasLogFunc m, HasTerm m) => Config -> RIO m HackageAuth Source #

Load Hackage authentification from the environment, if applicable, or from the given configuration.

Internal

maybeGetHackageKey :: RIO m (Maybe HackageKey) Source #

Optionally, load Hackage API authentification token from the HACKAGE_KEY environment variable, if it exists.