commercialhaskell / commercialhaskell/stack

Add command-line arguments for hackage username and password in upload

Open
#4,998 0 comments 0 reactions 0 assignees View on GitHub
component: sdist upload type: discuss type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

Hi there

I think it would be meaningful to have following command line arguments available for `stack upload` command:
```
--hackage-username=$username
--hackage-password=$password
```

Those arguments if set should replace credentials file or user prompt. I think it'll simplify upload to Hackage from CI/CD environment where `$username` and `$password` could be stored in env variables.

If people find it useful, I could land a PR:
- Add parser for `Stack.Options.UploadParser` that includes `SDistParser` and optional parameters `hackage-username` and `hackage-parser`
- If both parameters are presented, these are used as `HackageCreds` for `upload`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.