Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix/1742
Browse files Browse the repository at this point in the history
  • Loading branch information
pd93 committed Dec 31, 2024
2 parents f9cf245 + e5d8237 commit 14c3419
Show file tree
Hide file tree
Showing 109 changed files with 5,779 additions and 4,628 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ charset = utf-8
trim_trailing_whitespace = true
indent_style = tab

[*.{md,mdx,yml,yaml,json,toml,htm,html,js,css,svg,sh,bash,fish}]
[*.{md,mdx,yml,yaml,json,toml,htm,html,js,ts,css,svg,sh,bash,fish}]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

69 changes: 69 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: '🐞 Bug Report'
description: Report a bug in Task.
labels: ['state: needs-triage']
body:
- type: markdown
attributes:
value: |
Thanks for your bug report!
Before submitting, please check the list of [existing issues](https://github.com/go-task/task/issues) and make sure the same bug was not already reported by someone else.
- type: textarea
id: description
attributes:
label: Description
description: Describe the bug you're seeing.
placeholder: |
- What did you do?
- What did you expect to happen?
- What happened instead?
validations:
required: true

- type: input
id: version
attributes:
label: Version
description: What version(s) of Task is the issue occurring on?
validations:
required: true

- type: input
id: os
attributes:
label: Operating system
description: What operating system(s) is the issue occurring on?
validations:
required: true

- type: dropdown
id: experiments
attributes:
label: Experiments Enabled
description: Do you have any experiments enabled? You can check by running `task --experiments`.
multiple: true
options:
- Env Precedence
- Gentle Force
- Map Variables (1)
- Map Variables (2)
- Remote Taskfiles
validations:
required: false

- type: textarea
id: logs
attributes:
label: Example Taskfile
description: |
If you have a Taskfile that reproduces the issue, please paste it here.
This will be automatically formatted into code, so no need for backticks.
render: YAML
placeholder: |
version: '3'
tasks:
default:
cmds:
- 'echo "This Taskfile is buggy :("'
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Extension for Visual Studio Code
- name: '🔌 Task for Visual Studio Code'
url: https://github.com/go-task/vscode-task
about: Issues related to the Visual Studio Code extension should be opened here.
- name: Help forum on Discord
url: https://discord.gg/6TY36E39UK
about: 'The Discord #help channel is the best way to get help from the community.'
- name: Questions, Ideas and General Discussions
about: 'Issues related to the Visual Studio Code extension should be opened here.'
- name: '💬 Help forum on Discord'
url: https://discord.com/channels/974121106208354339/1025054680289660989
about: 'The #help channel on our Discord is the best way to get help from the community.'
- name: 'Questions, Ideas and General Discussions'
url: https://github.com/go-task/task/discussions
about: Ask questions and discuss general ideas with the community.
about: 'Ask questions and discuss general ideas with the community.'
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: '✨ Feature Request'
description: Suggest a new feature or enhancement for Task.
labels: ['state: needs-triage']
body:
- type: markdown
attributes:
value: |
Thanks for your feature request!
Before submitting, please check the list of [existing issues](https://github.com/go-task/task/issues) and make sure the same change was not already requested by someone else.
If your request is more of an idea than a feature request, consider opening a [discussion](https://github.com/go-task/task/discussions) instead.
- type: textarea
id: description
attributes:
label: Description
description: Describe the feature/enhancement you want to see in Task.
placeholder: |
- Give a general overview of the feature/enhancement.
- Explain problem is the change trying to solve.
- Give examples of how you would use the feature.
validations:
required: true
17 changes: 17 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,28 @@

linters:
enable:
- depguard
- goimports
- gofmt
- gofumpt
- misspell
- noctx
- paralleltest
- tenv
- thelper
- tparallel

linters-settings:
depguard:
rules:
main:
files:
- "$all"
- "!$test"
- "!**/errors/*.go"
deny:
- pkg: "errors"
desc: "Use github.com/go-task/task/v3/errors instead"
goimports:
local-prefixes: github.com/go-task
gofmt:
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ checksum:
nfpms:
- vendor: Task
homepage: https://taskfile.dev
maintainer: Andrey Nering <[email protected]>
maintainer: The Task authors <[email protected]>
description: Simple task runner written in Go
license: MIT
conflicts:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.20.4
22.12.0
70 changes: 56 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,60 @@

## Unreleased

- Fixed an issue where dynamic variables were not properly logged in verbose
mode (#1920, #1921 by @mgbowman).
- Support `silent` for defer statements (#1877, #1879 by @danilobuerger).
- Added an option to exclude some tasks from being included (#1859 by
@vmaerten).
- Fixed an issue where a required variable was incorrectly handled in a template
function (#1950, #1962 by @vmaerten).
- Expose a new `TASK_DIR` special variable, which will contain the absolute path
of task directory. (#1959, #1961 by @vmaerten).
- Fixed fatal bugs that caused concurrent map writes (#1605, #1972, #1974 by
@pd93, @GrahamDennis and @trim21.
- Refactored internal ordered map implementation to use
[github.com/elliotchance/orderedmap](https://github.com/elliotchance/orderedmap)
(#1797 by @pd93).
- Fixed a bug where variables defined at the task level were being ignored in
the `requires` section. (#1960, #1955, #1768 by @vmaerten and @mokeko)
- The `CHECKSUM` and `TIMESTAMP` variables are now accessible within `cmds` (#1872 by @niklasr22).

## v3.40.1 - 2024-12-06

- Fixed a security issue in `git-urls` by switching to the maintained fork
`chainguard-dev/git-urls` (#1917 by @AlekSi).
- Added missing `platforms` property to `cmds` that use `for` (#1915 by
@dkarter).
- Added misspell linter to check for misspelled English words (#1883 by
@christiandins).

## v3.40.0 - 2024-11-05

- Fixed output of some functions (e.g. `splitArgs`/`splitLines`) not working in
for loops (#1822, #1823 by @stawii).
- Added a new `TASK_OFFLINE` environment variable to configure the `--offline`
flag and expose it as a special variable in the templating system (#1470,
#1716 by @vmaerten and @pd93).
- Fixed a bug where multiple remote includes caused all prompts to display
without waiting for user input (#1832, #1833 by @vmaerten and @pd93).
- When using the "[Remote Taskfiles](https://taskfile.dev/experiments/remote-taskfiles/)".
experiment, you can now include Taskfiles from Git repositories (#1652 by @vmaerten).
- Improved the error message when a dotenv file cannot be parsed (#1842 by @pbitty).
- When using the
"[Remote Taskfiles](https://taskfile.dev/experiments/remote-taskfiles/)".
experiment, you can now include Taskfiles from Git repositories (#1652 by
@vmaerten).
- Improved the error message when a dotenv file cannot be parsed (#1842 by
@pbitty).
- Fix issue with directory when using the remote experiment (#1757 by @pbitty).
- Fixed an issue where a special variable was used in combination with a dotenv file (#1232, #1810 by @vmaerten).
- Fixed an issue where a special variable was used in combination with a dotenv
file (#1232, #1810 by @vmaerten).
- Refactor the way Task reads Taskfiles to improve readability (#1771 by
@pbitty).
- Added a new option to ensure variable is within the list of values (#1827 by
@vmaerten).
- Allow multiple prompts to be specified for a task (#1861, #1866 by @mfbmina).
- Added new template function: `numCPU`, which returns the number of logical
CPUs usable (#1890, #1887 by @Amoghrd).
- Fixed a bug where non-nil, empty dynamic variables are returned as an empty
interface (#1903, #1904 by @pd93).

## v3.39.2 - 2024-09-19

Expand Down Expand Up @@ -279,8 +321,8 @@
- Added the
[Remote Taskfiles experiment](https://taskfile.dev/experiments/remote-taskfiles)
as a draft (#1152, #1317 by @pd93).
- Improve performance of content checksuming on `sources:` by replacing md5 with
[XXH3](https://xxhash.com/) which is much faster. This is a soft breaking
- Improve performance of content checksumming on `sources:` by replacing md5
with [XXH3](https://xxhash.com/) which is much faster. This is a soft breaking
change because checksums will be invalidated when upgrading to this release
(#1325 by @ReillyBrogan).

Expand Down Expand Up @@ -339,7 +381,7 @@
- Deprecated `version: 2` schema. This will be removed in the next major release
(#1197, #1198, #1199 by @pd93).
- Added a new `prompt:` prop to set a warning prompt to be shown before running
a potential dangurous task (#100, #1163 by @MaxCheetham,
a potential dangerous task (#100, #1163 by @MaxCheetham,
[Documentation](https://taskfile.dev/usage/#warning-prompts)).
- Added support for single command task syntax. With this change, it's now
possible to declare just `cmd:` in a task, avoiding the more complex
Expand All @@ -354,7 +396,7 @@
percentage (#1173 by @misitebao).
- Starting on this release, official binaries for FreeBSD will be available to
download (#1068 by @andreynering).
- Fix some errors being unintendedly supressed (#1134 by @clintmod).
- Fix some errors being unintendedly suppressed (#1134 by @clintmod).
- Fix a nil pointer error when `version` is omitted from a Taskfile (#1148,
#1149 by @pd93).
- Fix duplicate error message when a task does not exists (#1141, #1144 by
Expand Down Expand Up @@ -427,8 +469,8 @@ it a go and let us know what you think via a
- Fixed a bug where tasks were sometimes incorrectly marked as internal (#1007
by @pd93).
- Update to Go 1.20 (bump minimum version to 1.19) (#1010 by @pd93)
- Added environment variable `FORCE_COLOR` support to force color output.
Usefull for environments without TTY (#1003 by @automation-stack)
- Added environment variable `FORCE_COLOR` support to force color output. Useful
for environments without TTY (#1003 by @automation-stack)

## v3.20.0 - 2023-01-14

Expand Down Expand Up @@ -783,7 +825,7 @@ it a go and let us know what you think via a

- Fix error code for the `--help` flag (#300, #330).
- Print version to stdout instead of stderr (#299, #329).
- Supress `context` errors when using the `--watch` flag (#313, #317).
- Suppress `context` errors when using the `--watch` flag (#313, #317).
- Support templating on description (#276, #283).

## v2.8.0 - 2019-12-07
Expand All @@ -792,7 +834,7 @@ it a go and let us know what you think via a
parallel (#266).
- Fixed bug where calling the `task` CLI only informing global vars would not
execute the `default` task.
- Add hability to silent all tasks by adding `silent: true` a the root of the
- Add ability to silent all tasks by adding `silent: true` a the root of the
Taskfile.

## v2.7.1 - 2019-11-10
Expand Down Expand Up @@ -934,7 +976,7 @@ document, since it describes in depth what changed for this version.
## v1.4.3 - 2017-09-07

- Allow assigning variables to tasks at run time via CLI (#33)
- Added suport for multiline variables from sh (#64)
- Added support for multiline variables from sh (#64)
- Fixes env: remove square braces and evaluate shell (#62)
- Watch: change watch library and few fixes and improvements
- When use watching, cancel and restart long running process on file change (#59
Expand Down Expand Up @@ -994,7 +1036,7 @@ document, since it describes in depth what changed for this version.
- More tests and Travis integration
- Watch a task (experimental)
- Possibility to call another task
- Fix "=" not being reconized in variables/environment variables
- Fix "=" not being recognized in variables/environment variables
- Tasks can now have a description, and help will print them (#10)
- Task dependencies now run concurrently
- Support for a default task (#16)
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
</p>

<p>
<a href="https://taskfile.dev/installation/">Installation</a> | <a href="https://taskfile.dev/usage/">Documentation</a> | <a href="https://twitter.com/taskfiledev">Twitter</a> | <a href="https://fosstodon.org/@task">Mastodon</a> | <a href="https://discord.gg/6TY36E39UK">Discord</a>
<a href="https://taskfile.dev/installation/">Installation</a> | <a href="https://taskfile.dev/usage/">Documentation</a> | <a href="https://twitter.com/taskfiledev">Twitter</a> | <a href="https://bsky.app/profile/taskfile.dev">Bluesky</a> | <a href="https://fosstodon.org/@task">Mastodon</a> | <a href="https://discord.gg/6TY36E39UK">Discord</a>
</p>

<h1>Gold Sponsors</h1>

<table>
<tr>
<td align="center" valign="middle">
<a target="_blank" href="https://devowl.io">
<img src="/website/static/img/devowl.io.svg" height="100px" title="devowl.io" />
</a>
</td>
</tr>
</table>
</div>
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ tasks:
goreleaser:install:
desc: Installs goreleaser
cmds:
- go install github.com/goreleaser/goreleaser@latest
- go install github.com/goreleaser/goreleaser/v2@latest

release:*:
desc: Prepare the project for a new release
Expand Down
2 changes: 1 addition & 1 deletion args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// Parse parses command line argument: tasks and global variables
func Parse(args ...string) ([]*ast.Call, *ast.Vars) {
calls := []*ast.Call{}
globals := &ast.Vars{}
globals := ast.NewVars()

for _, arg := range args {
if !strings.Contains(arg, "=") {
Expand Down
Loading

0 comments on commit 14c3419

Please sign in to comment.