Skip to content

Commit 9145f6a

Browse files
authored
Merge pull request #355 from per1234/on-demand-go-list
Avoid unnecessary `go list` command execution when running tasks
2 parents 4f0fa8b + f6bc0eb commit 9145f6a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

Taskfile.yml

+8-11
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@ vars:
1010
DIST_DIR: "dist"
1111
# Path of the project's primary Go module:
1212
DEFAULT_GO_MODULE_PATH: ./
13-
DEFAULT_GO_PACKAGES:
14-
sh: |
15-
echo $( \
16-
cd {{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}} \
17-
&& \
18-
go list ./... | \
19-
grep --invert-match 'github.com/arduino/arduino-lint/internal/rule/schema/schemadata' | \
20-
tr '\n' ' ' \
21-
|| \
22-
echo '"ERROR: Unable to discover Go packages"' \
23-
)
13+
DEFAULT_GO_PACKAGES: |
14+
$( \
15+
go list ./... | \
16+
grep --invert-match 'github.com/arduino/arduino-lint/internal/rule/schema/schemadata' | \
17+
tr '\n' ' ' \
18+
|| \
19+
echo '"ERROR: Unable to discover Go packages"' \
20+
)
2421
# build vars
2522
COMMIT:
2623
sh: echo "$(git log --no-show-signature -n 1 --format=%h)"

0 commit comments

Comments
 (0)