Add CHANGELOG + improvements to #980

Closes #978
This commit is contained in:
Andrey Nering
2023-01-06 21:39:57 -03:00
parent aa6c7e4b94
commit 2efb3533ec
7 changed files with 171 additions and 70 deletions

View File

@@ -442,8 +442,13 @@ tasks:
## Platform specific tasks and commands
If you want to restrict the running of tasks to explicit platforms, this can be achieved
using the `platforms` key. Tasks can be restricted to a specific OS, architecture or a
using the `platforms:` key. Tasks can be restricted to a specific OS, architecture or a
combination of both.
On a mismatch, the task or command will be skipped, and no error will be thrown.
The values allowed as OS or Arch are valid `GOOS` and `GOARCH` values, as
defined by the Go language
[here](https://github.com/golang/go/blob/master/src/go/build/syslist.go).
The `build-windows` task below will run only on Windows, and on any architecture:
@@ -454,7 +459,7 @@ tasks:
build-windows:
platforms: [windows]
cmds:
- echo 'Running command on windows'
- echo 'Running command on Windows'
```
This can be restricted to a specific architecture as follows:
@@ -466,7 +471,7 @@ tasks:
build-windows-amd64:
platforms: [windows/amd64]
cmds:
- echo 'Running command on windows (amd64)'
- echo 'Running command on Windows (amd64)'
```
It is also possible to restrict the task to specific architectures:
@@ -487,10 +492,10 @@ Multiple platforms can be specified as follows:
version: '3'
tasks:
build-windows:
build:
platforms: [windows/amd64, darwin]
cmds:
- echo 'Running command on windows (amd64) and darwin'
- echo 'Running command on Windows (amd64) and macOS'
```
Individual commands can also be restricted to specific platforms:
@@ -499,9 +504,9 @@ Individual commands can also be restricted to specific platforms:
version: '3'
tasks:
build-windows:
build:
cmds:
- cmd: echo 'Running command on windows (amd64) and darwin'
- cmd: echo 'Running command on Windows (amd64) and macOS'
platforms: [windows/amd64, darwin]
- cmd: echo 'Running on all platforms'
```