Skip to content

Commit b907ebf

Browse files
committed
Merge branch 'stable'
2 parents 0839a48 + a68dacb commit b907ebf

File tree

4 files changed

+479
-202
lines changed

4 files changed

+479
-202
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,12 @@ Hackage-only release:
209209
**Changes since v2.3.3**
210210

211211
Major changes:
212+
212213
* Add the `snapshot-location-base` yaml configuration option, which allows to
213214
override the default location of snapshot configuration files. This option
214215
affects how snapshot synonyms (LTS/Nightly) are expanded to URLs by the
215216
`pantry` library.
217+
216218
* `docker-network` configuration key added to override docker `--net` arg
217219

218220
Behavior changes:

doc/GUIDE_advanced.md

Lines changed: 112 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,36 @@ ghc-9.0.2
250250
Hackage only accepts packages for uploading in a standard form, a compressed
251251
archive ('tarball') in the format produced by Cabal's `sdist` action.
252252

253-
`stack sdist` generates an file for your package, in the format accepted by
253+
`stack sdist` generates a file for your package, in the format accepted by
254254
Hackage for uploads. The command will report the location of the generated file.
255-
The location can be changed from the default using the
256-
`--tar-dir <path_to_directory>` option.
257255

258-
By default, the command will check the package for common mistakes. This can be
259-
disabled with the flag `--ignore-check`.
256+
### The `stack sdist --ignore-check` flag
260257

261-
Setting the flag `--test-tarball` will cause Stack to attempt to build the
262-
resulting package archive, to test it.
258+
Pass the flag to disable checks of the package for common mistakes. By default,
259+
the command will check the package for common mistakes.
260+
261+
### The `stack sdist --pvp-bounds` option
262+
263+
The `--pvp-bounds <pvp_bounds_mode>` option determines whether and, if so, how
264+
PVP version bounds should be added to the Cabal file of the package. The
265+
available modes for basic use are: `none`, `lower`, `upper`, and `both`. The
266+
available modes for use with Cabal file revisions are `lower-revision`,
267+
`upper-revision` and `both-revision`.
268+
269+
For futher information, see the
270+
[YAML configuration](yaml_configuration.md#pvp-bounds) documentation.
271+
272+
### The `stack sdist --tar-dir` option
273+
274+
The `--tar-dir <path_to_directory>` option determines whether the package
275+
archive should be copied to the specified directory.
276+
277+
### The `stack sdist --[no-]test-tarball` flag
278+
279+
Default: Disabled
280+
281+
Set the flag to cause Stack to test the resulting package archive, by attempting
282+
to build it.
263283

264284
## The `stack templates` command
265285

@@ -350,43 +370,99 @@ accepts an optional `--to` argument to specify the destination directory.
350370

351371
## The `stack upload` command
352372

353-
`stack upload` uploads an sdist to Hackage. As of version
354-
[1.1.0](https://docs.haskellstack.org/en/v1.1.0/ChangeLog/) Stack will also
355-
attempt to GPG sign your packages as per
356-
[our blog post](https://www.fpcomplete.com/blog/2016/05/stack-security-gnupg-keys).
373+
Hackage accepts packages for uploading in a standard form, a compressed archive
374+
('tarball') in the format produced by Cabal's `sdist` action.
375+
376+
`stack upload` generates a file for your package, in the format accepted by
377+
Hackage for uploads, and uploads the package to Hackage. For example, if the
378+
current working directory is the root directory of your project:
379+
380+
~~~text
381+
stack upload .
382+
~~~
383+
384+
### The `HACKAGE_USERNAME` and `HACKAGE_PASSWORD` environment variables
385+
386+
[:octicons-tag-24: 2.3.1](https://github.com/commercialhaskell/stack/releases/tag/v2.3.1)
387+
388+
`stack upload` will request a Hackage username and password to authenticate.
389+
This can be avoided by setting the `HACKAGE_USERNAME` and `HACKAGE_PASSWORD`
390+
environment variables. For
391+
example:
392+
393+
=== "Unix-like"
357394

358-
* `--no-signature` disables signing of packages
359-
* `--candidate` upload a
360-
[package candidate](http://hackage.haskell.org/upload#candidates)
361-
* Hackage API key can be used instead of username and password. For example, on
362-
Unix-like operating systems command:
395+
~~~text
396+
export $HACKAGE_USERNAME="<username>"
397+
export $HACKAGE_PASSWORD="<password>"
398+
stack upload .
399+
~~~
363400

364-
~~~text
365-
HACKAGE_KEY=<api_key>
366-
stack upload .
367-
~~~
401+
=== "Windows (with PowerShell)"
368402

369-
and on Windows (with PowerShell) command:
403+
~~~text
404+
$Env:HACKAGE_USERNAME='<username>'
405+
$Env:HACKAGE_PASSWORD='<password>'
406+
stack upload .
407+
~~~
370408

371-
~~~text
372-
$Env:HACKAGE_KEY=<api_key>
373-
stack upload .
374-
~~~
409+
### The `HACKAGE_KEY` environment variable
375410

376-
* `username` and `password` can be read by setting the following environment
377-
variables. On Unix-like operating systems command:
411+
[:octicons-tag-24: 2.7.5](https://github.com/commercialhaskell/stack/releases/tag/v2.7.5)
378412

379-
~~~text
380-
export $HACKAGE_USERNAME="<username>"
381-
export $HACKAGE_PASSWORD="<password>"
382-
~~~
413+
Hackage allows its members to register an API authentification token and to
414+
authenticate using the token.
383415

384-
and on Windows (with PowerShell) command:
416+
A Hackage API authentification token can be used with `stack upload` instead of
417+
username and password, by setting the `HACKAGE_KEY` environment variable. For
418+
example:
419+
420+
=== "Unix-like"
421+
422+
~~~text
423+
HACKAGE_KEY=<api_authentification_token>
424+
stack upload .
425+
~~~
426+
427+
=== "Windows (with PowerShell)"
428+
429+
~~~text
430+
$Env:HACKAGE_KEY=<api_authentification_token>
431+
stack upload .
432+
~~~
433+
434+
### The `stack upload --candidate` flag
435+
436+
Pass the flag to upload a
437+
[package candidate](http://hackage.haskell.org/upload#candidates).
438+
439+
### The `stack upload --ignore-check` flag
440+
441+
Pass the flag to disable checks of the package for common mistakes. By default,
442+
the command will check the package for common mistakes.
443+
444+
### The `stack upload --pvp-bounds` option
445+
446+
The `--pvp-bounds <pvp_bounds_mode>` option determines whether and, if so, how
447+
PVP version bounds should be added to the Cabal file of the package. The
448+
available modes for basic use are: `none`, `lower`, `upper`, and `both`. The
449+
available modes for use with Cabal file revisions are `lower-revision`,
450+
`upper-revision` and `both-revision`.
451+
452+
For futher information, see the
453+
[YAML configuration](yaml_configuration.md#pvp-bounds) documentation.
454+
455+
### The `stack upload --tar-dir` option
456+
457+
The `--tar-dir <path_to_directory>` option determines whether the package
458+
archive should be copied to the specified directory.
459+
460+
### The `stack upload --[no-]test-tarball` flag
461+
462+
Default: Disabled
385463

386-
~~~text
387-
$Env:HACKAGE_USERNAME='<username>'
388-
$Env:HACKAGE_PASSWORD='<password>'
389-
~~~
464+
Set the flag to cause Stack to test the resulting package archive, by attempting
465+
to build it.
390466

391467
## Docker integration
392468

0 commit comments

Comments
 (0)