|
15 | 15 | stack upgrade [--source-only] [--git] [--git-repo ARG] [--git-branch ARG]
|
16 | 16 | ~~~
|
17 | 17 |
|
18 |
| -`stack upgrade` will get a new version of Stack, either from an existing |
19 |
| -binary distribution (pass the `--binary-only` flag, the default) or from |
20 |
| -compiling source code (pass the `--source-only` flag). The `--binary-only` and |
21 |
| -`--source-only` flags are alternatives. |
| 18 | +`stack upgrade` will get a new version of Stack. |
| 19 | + |
| 20 | +By default: |
| 21 | + |
| 22 | +* the new version will be from an existing binary distribution. Pass the |
| 23 | + `--source-only` flag to specify compiling from source code. The |
| 24 | + `--binary-only` and `--source-only` flags are alternatives; |
| 25 | + |
| 26 | +* the new version will not overwrite the existing version unless it is newer. |
| 27 | + Pass the `--force-download` flag to force a download; |
| 28 | + |
| 29 | +* the new version will be the latest available. Pass the |
| 30 | + `--binary-version <version>` option to specify the version (this implies |
| 31 | + `--force-dowload`); |
| 32 | + |
| 33 | +* the binary distribution will be sought from the GitHub organisation/user |
| 34 | + `commercialhaskell`. Pass the `--github-org <user>` option to specify a |
| 35 | + different GitHub user; |
| 36 | + |
| 37 | +* the binary distribution will be sought from the GitHub repository `stack`. |
| 38 | + Pass the `--github-repo <repository>` option to specify a different |
| 39 | + repository; and |
| 40 | + |
| 41 | +* the binary distribution will be sought for the current platform. Pass the |
| 42 | + `--binary-platform <platform>` option to specify a different platform (`<operating_system>-<architecture>-<suffix>`). |
22 | 43 |
|
23 | 44 | When compiling from source code, by default:
|
24 | 45 |
|
25 | 46 | * Stack will obtain the source code for the most recent version in the package
|
26 | 47 | index (eg Hackage). Pass the flag `--git` to specify the most recent version
|
27 |
| - from the `master` branch of Stack's repository. |
| 48 | + from the `master` branch of Stack's repository (pass the option |
| 49 | + `--git-branch <branch>` to specify a different branch and the option |
| 50 | + `--git-repo <repo_url>` to specify a different repository). |
| 51 | + |
| 52 | +## Examples |
| 53 | + |
| 54 | +* `stack upgrade` seeks an upgrade to the latest version of Stack available as a |
| 55 | + binary distribution for the platform, if newer. |
| 56 | + |
| 57 | +* `stack upgrade --force-download` seeks an upgrade to the latest version of |
| 58 | + Stack available as a binary distribution for the platform, even if not newer. |
| 59 | + |
| 60 | +* `stack upgrade --binary-version 2.9.3` seeks an upgrade to Stack 2.9.3 if |
| 61 | + available as a binary distribution for the platform, even if not newer. |
| 62 | + |
| 63 | +* `stack upgrade --source-only` seeks an upgrade by building Stack with |
| 64 | + Stack from the latest version of the source code in the package index |
| 65 | + (i.e. Hackage). |
| 66 | + |
| 67 | +* `stack upgrade --source-only --git` seeks an upgrade by building Stack with |
| 68 | + Stack from the latest version of the source code in the `master` branch of |
| 69 | + Stack's repository. |
0 commit comments