├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── pull_request_template.md ├── renovate.json └── workflows │ ├── issue-awaiting-response.yml │ ├── issue-closed.yml │ ├── issue-experiment.yml │ ├── issue-needs-triage.yml │ ├── lint.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .golangci.yml ├── .goreleaser.yml ├── .mockery.yaml ├── .nvmrc ├── .prettierrc.yml ├── .taskrc.yml ├── .vscode ├── extensions.json └── settings-sample.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── Taskfile.yml ├── args ├── args.go └── args_test.go ├── bin └── .keep ├── call.go ├── cmd ├── release │ └── main.go ├── sleepit │ └── sleepit.go ├── task │ └── task.go └── tmp │ └── main.go ├── compiler.go ├── completion.go ├── completion ├── bash │ └── task.bash ├── fish │ └── task.fish ├── ps │ └── task.ps1 └── zsh │ └── _task ├── concurrency.go ├── errors ├── error_taskfile_decode.go ├── errors.go ├── errors_task.go ├── errors_taskfile.go └── errors_taskrc.go ├── executor.go ├── executor_test.go ├── experiments ├── errors.go ├── experiment.go ├── experiment_test.go └── experiments.go ├── formatter_test.go ├── go.mod ├── go.sum ├── hash.go ├── help.go ├── init.go ├── init_test.go ├── install-task.sh ├── internal ├── deepcopy │ └── deepcopy.go ├── editors │ └── output.go ├── env │ └── env.go ├── execext │ ├── devnull.go │ └── exec.go ├── filepathext │ └── filepathext.go ├── fingerprint │ ├── checker.go │ ├── checker_mock.go │ ├── glob.go │ ├── sources.go │ ├── sources_checksum.go │ ├── sources_checksum_test.go │ ├── sources_none.go │ ├── sources_timestamp.go │ ├── status.go │ ├── task.go │ └── task_test.go ├── flags │ └── flags.go ├── fsext │ ├── fs.go │ ├── fs_test.go │ └── testdata │ │ ├── bar.txt │ │ └── foo.txt ├── fsnotifyext │ └── fsnotify_dedup.go ├── goext │ └── meta.go ├── hash │ └── hash.go ├── logger │ └── logger.go ├── output │ ├── group.go │ ├── interleaved.go │ ├── output.go │ ├── output_test.go │ └── prefixed.go ├── slicesext │ ├── slicesext.go │ └── slicesext_test.go ├── sort │ ├── sorter.go │ └── sorter_test.go ├── summary │ ├── summary.go │ └── summary_test.go ├── sysinfo │ ├── uid.go │ └── uid_win.go ├── templater │ ├── funcs.go │ └── templater.go ├── term │ └── term.go └── version │ ├── version.go │ └── version.txt ├── package-lock.json ├── package.json ├── precondition.go ├── requires.go ├── setup.go ├── signals.go ├── signals_test.go ├── status.go ├── task.go ├── task_test.go ├── taskfile ├── ast │ ├── cmd.go │ ├── defer.go │ ├── dep.go │ ├── for.go │ ├── glob.go │ ├── graph.go │ ├── include.go │ ├── location.go │ ├── matrix.go │ ├── output.go │ ├── platforms.go │ ├── platforms_test.go │ ├── precondition.go │ ├── precondition_test.go │ ├── prompt.go │ ├── requires.go │ ├── task.go │ ├── taskfile.go │ ├── taskfile_test.go │ ├── tasks.go │ ├── var.go │ └── vars.go ├── dotenv.go ├── node.go ├── node_base.go ├── node_cache.go ├── node_file.go ├── node_git.go ├── node_git_test.go ├── node_http.go ├── node_http_test.go ├── node_stdin.go ├── node_test.go ├── reader.go ├── snippet.go ├── snippet_test.go ├── taskfile.go ├── templates │ └── default.yml └── themes │ └── task.xml ├── taskrc ├── ast │ └── taskrc.go ├── node.go ├── reader.go └── taskrc.go ├── testdata ├── alias │ ├── Taskfile.yml │ ├── Taskfile2.yml │ └── testdata │ │ ├── TestAlias-alias.golden │ │ ├── TestAlias-alias_summary.golden │ │ ├── TestAlias-duplicate_alias-err-run.golden │ │ └── TestAlias-duplicate_alias.golden ├── checksum │ ├── .gitignore │ ├── Taskfile.yml │ ├── ignore_me.txt │ └── source.txt ├── cmds_vars │ ├── Taskfile.yml │ └── source.txt ├── concurrency │ ├── Taskfile.yml │ └── testdata │ │ └── TestConcurrency.golden ├── cyclic │ └── Taskfile.yml ├── deferred │ └── Taskfile.yml ├── deps │ ├── Taskfile.yml │ ├── d1.txt │ ├── d11.txt │ ├── d12.txt │ ├── d13.txt │ ├── d2.txt │ ├── d21.txt │ ├── d22.txt │ ├── d23.txt │ ├── d3.txt │ ├── d31.txt │ ├── d32.txt │ ├── d33.txt │ └── testdata │ │ └── TestDeps.golden ├── desc │ └── Taskfile.yml ├── dir │ ├── Taskfile.yml │ ├── dynamic_var │ │ ├── .gitignore │ │ ├── Taskfile.yml │ │ └── subdirectory │ │ │ └── Taskfile.yml │ ├── dynamic_var_on_created_dir │ │ └── Taskfile.yml │ ├── explicit_doesnt_exist │ │ └── Taskfile.yml │ └── explicit_exists │ │ ├── Taskfile.yml │ │ └── exists │ │ └── .keep ├── dotenv │ ├── .gitignore │ ├── default │ │ └── Taskfile.yml │ ├── env_var_in_path │ │ ├── .env.testing │ │ └── Taskfile.yml │ ├── error_included_envs │ │ └── Taskfile.yml │ ├── include1 │ │ ├── .env │ │ ├── Taskfile.yml │ │ └── envs │ │ │ └── .env │ ├── local_env_in_path │ │ ├── .env.testing │ │ └── Taskfile.yml │ ├── local_var_in_path │ │ ├── .env.testing │ │ └── Taskfile.yml │ ├── missing_env │ │ └── Taskfile.yml │ └── parse_error │ │ ├── .env-with-error │ │ └── Taskfile.yml ├── dotenv_task │ └── default │ │ ├── .env │ │ ├── .gitignore │ │ └── Taskfile.yml ├── dry │ └── Taskfile.yml ├── dry_checksum │ ├── Taskfile.yml │ └── source.txt ├── empty_task │ ├── Taskfile.yml │ └── testdata │ │ └── TestEmptyTask.golden ├── empty_taskfile │ ├── Taskfile.yml │ └── testdata │ │ ├── TestEmptyTaskfile-err-setup.golden │ │ └── TestEmptyTaskfile.golden ├── env │ ├── Taskfile.yml │ ├── dynamic.txt │ ├── global.txt │ ├── local.txt │ ├── multiple_type.txt │ ├── not-overridden.txt │ ├── overridden.txt │ └── testdata │ │ ├── TestEnv-env_precedence_disabled.golden │ │ └── TestEnv-env_precedence_enabled.golden ├── error_code │ └── Taskfile.yml ├── evaluate_symlinks_in_paths │ ├── Taskfile.yaml │ ├── shared │ │ ├── b │ │ └── inner_shared │ │ │ └── c │ └── src │ │ ├── a │ │ └── shared ├── exit_code │ └── Taskfile.yml ├── exit_immediately │ └── Taskfile.yml ├── expand │ └── Taskfile.yml ├── file_names │ ├── .gitignore │ ├── Taskfile.dist.yaml │ │ └── Taskfile.dist.yaml │ ├── Taskfile.dist.yml │ │ └── Taskfile.dist.yml │ ├── Taskfile.yaml │ │ └── Taskfile.yaml │ └── Taskfile.yml │ │ └── Taskfile.yml ├── for │ ├── cmds │ │ ├── Taskfile.yml │ │ ├── bar.txt │ │ ├── foo.txt │ │ └── testdata │ │ │ ├── TestForCmds-loop-different-tasks.golden │ │ │ ├── TestForCmds-loop-explicit.golden │ │ │ ├── TestForCmds-loop-generates-glob.golden │ │ │ ├── TestForCmds-loop-generates.golden │ │ │ ├── TestForCmds-loop-matrix-ref-error-err-run.golden │ │ │ ├── TestForCmds-loop-matrix-ref-error.golden │ │ │ ├── TestForCmds-loop-matrix-ref.golden │ │ │ ├── TestForCmds-loop-matrix.golden │ │ │ ├── TestForCmds-loop-sources-glob.golden │ │ │ ├── TestForCmds-loop-sources.golden │ │ │ ├── TestForCmds-loop-task-as.golden │ │ │ ├── TestForCmds-loop-task.golden │ │ │ ├── TestForCmds-loop-vars-sh.golden │ │ │ └── TestForCmds-loop-vars.golden │ └── deps │ │ ├── Taskfile.yml │ │ ├── bar.txt │ │ ├── foo.txt │ │ └── testdata │ │ ├── TestForDeps-loop-different-tasks.golden │ │ ├── TestForDeps-loop-explicit.golden │ │ ├── TestForDeps-loop-generates-glob.golden │ │ ├── TestForDeps-loop-generates.golden │ │ ├── TestForDeps-loop-matrix-ref-error-err-run.golden │ │ ├── TestForDeps-loop-matrix-ref-error.golden │ │ ├── TestForDeps-loop-matrix-ref.golden │ │ ├── TestForDeps-loop-matrix.golden │ │ ├── TestForDeps-loop-sources-glob.golden │ │ ├── TestForDeps-loop-sources.golden │ │ ├── TestForDeps-loop-task-as.golden │ │ ├── TestForDeps-loop-task.golden │ │ ├── TestForDeps-loop-vars-sh.golden │ │ └── TestForDeps-loop-vars.golden ├── force │ └── Taskfile.yml ├── fuzzy │ ├── Taskfile.yml │ └── testdata │ │ ├── TestFuzzyModel-fuzzy-err-run.golden │ │ ├── TestFuzzyModel-fuzzy.golden │ │ └── TestFuzzyModel-not-fuzzy.golden ├── generates │ ├── .gitignore │ ├── Taskfile.yml │ └── sub │ │ └── .keep ├── ignore_errors │ └── Taskfile.yml ├── ignore_nil_elements │ ├── cmds │ │ └── Taskfile.yml │ ├── deps │ │ └── Taskfile.yml │ ├── includes │ │ ├── Taskfile.yml │ │ └── inc.yml │ └── preconditions │ │ └── Taskfile.yml ├── ignore_signals │ └── Taskfile.yml ├── include_with_vars │ ├── Taskfile.yml │ └── include │ │ ├── Taskfile.include1.yml │ │ ├── Taskfile.include2.yml │ │ └── Taskfile.include3.yml ├── include_with_vars_inside_include │ ├── Taskfile.yml │ └── include │ │ └── Taskfile.include.yml ├── include_with_vars_multi_level │ ├── Taskfile.yml │ ├── bar │ │ └── Taskfile.yml │ ├── foo │ │ └── Taskfile.yml │ └── lib │ │ └── Taskfile.yml ├── included_taskfile_var_merging │ ├── Taskfile.yaml │ ├── bar │ │ └── Taskfile.yaml │ └── foo │ │ └── Taskfile.yaml ├── includes │ ├── .gitignore │ ├── Taskfile.yml │ ├── Taskfile2.yml │ ├── Taskfile_darwin.yml │ ├── Taskfile_linux.yml │ ├── Taskfile_windows.yml │ ├── included │ │ └── Taskfile.yml │ ├── module1 │ │ └── Taskfile.yml │ └── module2 │ │ └── Taskfile.yml ├── includes_call_root_task │ ├── .gitignore │ ├── Taskfile.yml │ └── Taskfile2.yml ├── includes_checksum │ ├── correct │ │ ├── Taskfile.yml │ │ └── testdata │ │ │ └── TestIncludeChecksum-correct.golden │ ├── correct_remote │ │ └── Taskfile.yml │ ├── included.yml │ └── incorrect │ │ ├── Taskfile.yml │ │ └── testdata │ │ ├── TestIncludeChecksum-incorrect-err-setup.golden │ │ └── TestIncludeChecksum-incorrect.golden ├── includes_cycle │ ├── Taskfile.yml │ └── one │ │ ├── Taskfile.yml │ │ └── two │ │ └── Taskfile.yml ├── includes_deps │ ├── .gitignore │ ├── Taskfile.yml │ └── Taskfile2.yml ├── includes_empty │ ├── .gitignore │ ├── Taskfile.yml │ └── Taskfile2.yml ├── includes_flatten │ ├── .gitignore │ ├── Taskfile.multiple.yml │ ├── Taskfile.with_default.yml │ ├── Taskfile.yml │ ├── included │ │ └── Taskfile.yml │ └── nested │ │ └── Taskfile.yml ├── includes_http │ ├── child-taskfile2.yml │ ├── child-taskfile3.yml │ ├── root-taskfile-remotefile-empty-dir-1st.yml │ └── root-taskfile-remotefile-empty-dir-2nd.yml ├── includes_incorrect │ ├── Taskfile.yml │ └── incomplete.yml ├── includes_internal │ ├── Taskfile.yml │ └── Taskfile2.yml ├── includes_interpolation │ ├── include │ │ └── Taskfile.yml │ ├── include_with_dir │ │ └── Taskfile.yml │ ├── include_with_env_variable │ │ └── Taskfile.yml │ └── included │ │ └── Taskfile.yml ├── includes_multi_level │ ├── Taskfile.yml │ ├── called_one.txt │ ├── called_three.txt │ ├── called_two.txt │ └── one │ │ ├── Taskfile.yml │ │ └── two │ │ ├── Taskfile.yml │ │ └── three │ │ └── Taskfile.yml ├── includes_optional │ ├── .gitignore │ └── Taskfile.yml ├── includes_optional_explicit_false │ └── Taskfile.yml ├── includes_optional_implicit_false │ └── Taskfile.yml ├── includes_rel_path │ ├── Taskfile.yml │ ├── common │ │ └── Taskfile.yml │ └── included │ │ └── Taskfile.yml ├── includes_remote │ ├── .gitignore │ ├── Taskfile.yml │ └── first │ │ ├── Taskfile.yml │ │ └── second │ │ └── Taskfile.yml ├── includes_shadowed_default │ ├── Taskfile.yml │ ├── Taskfile2.yml │ └── file.txt ├── includes_unshadowed_default │ ├── Taskfile.yml │ ├── Taskfile2.yml │ └── file.txt ├── includes_with_excludes │ ├── Taskfile.yml │ └── included │ │ └── Taskfile.yml ├── includes_yaml │ ├── .gitignore │ ├── Custom.ext │ └── included │ │ ├── Taskfile.yaml │ │ └── custom.yaml ├── init │ └── .gitignore ├── internal_task │ └── Taskfile.yml ├── json_list_format │ ├── Taskfile.yml │ └── testdata │ │ └── TestJsonListFormat.golden ├── label_list │ ├── Taskfile.yml │ └── testdata │ │ └── TestNoLabelInList.golden ├── label_status │ ├── Taskfile.yml │ └── testdata │ │ ├── TestLabel-status-err-status.golden │ │ └── TestLabel-status.golden ├── label_summary │ ├── Taskfile.yml │ └── testdata │ │ ├── TestLabel-label_in_summary.golden │ │ └── TestLabel-summary.golden ├── label_uptodate │ ├── Taskfile.yml │ └── testdata │ │ └── TestLabel-up_to_date.golden ├── label_var │ ├── Taskfile.yml │ └── testdata │ │ └── TestLabel-var.golden ├── list_desc_interpolation │ ├── Taskfile.yml │ └── testdata │ │ └── TestListDescInterpolation.golden ├── list_mixed_desc │ ├── Taskfile.yml │ └── testdata │ │ ├── TestListAllShowsNoDesc.golden │ │ └── TestListCanListDescOnly.golden ├── output_group │ └── Taskfile.yml ├── output_group_error_only │ └── Taskfile.yml ├── params │ ├── Taskfile.yml │ ├── dep1.txt │ ├── dep2.txt │ ├── exclamation.txt │ ├── german.txt │ ├── hello.txt │ ├── portuguese.txt │ ├── portuguese2.txt │ ├── spanish-dep.txt │ ├── spanish.txt │ ├── testdata │ │ └── TestParams.golden │ └── world.txt ├── platforms │ └── Taskfile.yml ├── precondition │ ├── Taskfile.yml │ ├── foo.txt │ └── testdata │ │ ├── TestPrecondition-a_precondition_has_been_met.golden │ │ ├── TestPrecondition-a_precondition_was_not_met-err-run.golden │ │ ├── TestPrecondition-a_precondition_was_not_met.golden │ │ ├── TestPrecondition-precondition_in_cmd_fails_the_task-err-run.golden │ │ ├── TestPrecondition-precondition_in_cmd_fails_the_task.golden │ │ ├── TestPrecondition-precondition_in_dependency_fails_the_task-err-run.golden │ │ └── TestPrecondition-precondition_in_dependency_fails_the_task.golden ├── prompt │ ├── Taskfile.yml │ └── testdata │ │ ├── TestPromptAssumeYes---yes_flag_should_skip_prompt.golden │ │ ├── TestPromptAssumeYes-task_should_raise_errors.TaskCancelledError-err-run.golden │ │ ├── TestPromptAssumeYes-task_should_raise_errors.TaskCancelledError.golden │ │ ├── TestPromptInSummary-test_Enter_stops_task-test_Enter_stops_task-err-run.golden │ │ ├── TestPromptInSummary-test_Enter_stops_task-test_Enter_stops_task.golden │ │ ├── TestPromptInSummary-test_junk_value_stops_task-test_junk_value_stops_task-err-run.golden │ │ ├── TestPromptInSummary-test_junk_value_stops_task-test_junk_value_stops_task.golden │ │ ├── TestPromptInSummary-test_long_approval-test_long_approval.golden │ │ ├── TestPromptInSummary-test_short_approval-test_short_approval.golden │ │ ├── TestPromptInSummary-test_stops_task-test_stops_task-err-run.golden │ │ ├── TestPromptInSummary-test_stops_task-test_stops_task.golden │ │ ├── TestPromptInSummary-test_uppercase_approval-test_uppercase_approval.golden │ │ └── TestPromptWithIndirectTask.golden ├── requires │ ├── Taskfile.yml │ └── testdata │ │ ├── TestRequires-fails_validation-err-run.golden │ │ ├── TestRequires-fails_validation.golden │ │ ├── TestRequires-passes_validation.golden │ │ ├── TestRequires-require_before_compile-err-run.golden │ │ ├── TestRequires-require_before_compile.golden │ │ ├── TestRequires-required_var_missing-err-run.golden │ │ ├── TestRequires-required_var_missing.golden │ │ ├── TestRequires-required_var_missing_+_fails_validation#01.golden │ │ ├── TestRequires-required_var_missing_+_fails_validation-err-run.golden │ │ ├── TestRequires-required_var_missing_+_fails_validation.golden │ │ ├── TestRequires-required_var_ok.golden │ │ └── TestRequires-var_defined_in_task.golden ├── run │ ├── .gitignore │ └── Taskfile.yml ├── run_once_shared_deps │ ├── Taskfile.yml │ ├── library │ │ └── Taskfile.yml │ ├── service-a │ │ ├── Taskfile.yml │ │ └── src │ │ │ └── imasource.go │ └── service-b │ │ ├── Taskfile.yml │ │ └── src │ │ └── imasource.go ├── shopts │ ├── command_level │ │ └── Taskfile.yml │ ├── global_level │ │ └── Taskfile.yml │ └── task_level │ │ └── Taskfile.yml ├── short_task_notation │ └── Taskfile.yml ├── silent │ └── Taskfile.yml ├── single_cmd_dep │ ├── .gitignore │ └── Taskfile.yml ├── special_vars │ ├── Taskfile.yml │ ├── included │ │ └── Taskfile.yml │ ├── subdir │ │ ├── .gitkeep │ │ └── testdata │ │ │ ├── TestSpecialVars-testdata-special_vars-subdir-included-print-root-dir.golden │ │ │ ├── TestSpecialVars-testdata-special_vars-subdir-included-print-task.golden │ │ │ ├── TestSpecialVars-testdata-special_vars-subdir-included-print-taskfile-dir.golden │ │ │ ├── TestSpecialVars-testdata-special_vars-subdir-included-print-taskfile.golden │ │ │ ├── TestSpecialVars-testdata-special_vars-subdir-print-root-dir.golden │ │ │ ├── TestSpecialVars-testdata-special_vars-subdir-print-task-dir.golden │ │ │ ├── TestSpecialVars-testdata-special_vars-subdir-print-task.golden │ │ │ ├── TestSpecialVars-testdata-special_vars-subdir-print-taskfile-dir.golden │ │ │ └── TestSpecialVars-testdata-special_vars-subdir-print-taskfile.golden │ └── testdata │ │ ├── TestSpecialVars-testdata-special_vars-included-print-root-dir.golden │ │ ├── TestSpecialVars-testdata-special_vars-included-print-task.golden │ │ ├── TestSpecialVars-testdata-special_vars-included-print-taskfile-dir.golden │ │ ├── TestSpecialVars-testdata-special_vars-included-print-taskfile.golden │ │ ├── TestSpecialVars-testdata-special_vars-print-root-dir.golden │ │ ├── TestSpecialVars-testdata-special_vars-print-task-dir.golden │ │ ├── TestSpecialVars-testdata-special_vars-print-task.golden │ │ ├── TestSpecialVars-testdata-special_vars-print-taskfile-dir.golden │ │ └── TestSpecialVars-testdata-special_vars-print-taskfile.golden ├── split_args │ └── Taskfile.yml ├── status │ ├── .gitignore │ ├── Taskfile.yml │ └── testdata │ │ ├── TestStatus-run_gen-bar_1_silent.golden │ │ ├── TestStatus-run_gen-bar_2_silent.golden │ │ ├── TestStatus-run_gen-bar_3_silent.golden │ │ ├── TestStatus-run_gen-bar_4_silent.golden │ │ ├── TestStatus-run_gen-bar_5.golden │ │ ├── TestStatus-run_gen-bar_6.golden │ │ ├── TestStatus-run_gen-baz_2.golden │ │ ├── TestStatus-run_gen-baz_3.golden │ │ ├── TestStatus-run_gen-baz_4_verbose.golden │ │ ├── TestStatus-run_gen-baz_silent.golden │ │ ├── TestStatus-run_gen-foo_1_silent.golden │ │ ├── TestStatus-run_gen-foo_2.golden │ │ └── TestStatus-run_gen-foo_3.golden ├── status_vars │ ├── .gitignore │ ├── Taskfile.yml │ └── source.txt ├── summary │ ├── Taskfile.yml │ └── task-with-summary.txt ├── taskfile_walk │ ├── Taskfile.yml │ └── foo │ │ └── bar │ │ └── .gitkeep ├── user_working_dir │ └── Taskfile.yml ├── user_working_dir_with_includes │ ├── Taskfile.yml │ ├── included │ │ └── Taskfile.yml │ └── somedir │ │ └── .keep ├── var_inheritance │ └── v3 │ │ ├── entrypoint-global-dotenv │ │ ├── Taskfile.yml │ │ ├── global.env │ │ └── testdata │ │ │ └── TestVarInheritance-entrypoint-global-dotenv.golden │ │ ├── entrypoint-global-vars │ │ ├── Taskfile.yml │ │ ├── global.env │ │ └── testdata │ │ │ └── TestVarInheritance-entrypoint-global-vars.golden │ │ ├── entrypoint-task-call-dotenv │ │ ├── Taskfile.yml │ │ ├── called-task.env │ │ ├── global.env │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-entrypoint-task-call-dotenv.golden │ │ ├── entrypoint-task-call-task-vars │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-entrypoint-task-call-task-vars.golden │ │ ├── entrypoint-task-call-vars │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-entrypoint-task-call-vars.golden │ │ ├── entrypoint-task-dotenv │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-entrypoint-task-dotenv.golden │ │ ├── entrypoint-task-vars │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-entrypoint-task-vars.golden │ │ ├── included-global-vars │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── included.yml │ │ └── testdata │ │ │ └── TestVarInheritance-included-global-vars.golden │ │ ├── included-task-call-dotenv │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── included.yml │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-included-task-call-dotenv.golden │ │ ├── included-task-call-task-vars │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── included.yml │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-included-task-call-task-vars.golden │ │ ├── included-task-call-vars │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── included.yml │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-included-task-call-vars.golden │ │ ├── included-task-dotenv │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── included.yml │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-included-task-dotenv.golden │ │ ├── included-task-vars │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── included.yml │ │ ├── task.env │ │ └── testdata │ │ │ └── TestVarInheritance-included-task-vars.golden │ │ ├── included-task │ │ ├── Taskfile.yml │ │ ├── global.env │ │ ├── included.yml │ │ └── task.env │ │ └── shell │ │ ├── Taskfile.yml │ │ └── testdata │ │ └── TestVarInheritance-shell.golden ├── var_references │ ├── Taskfile.yml │ └── testdata │ │ ├── TestReference-reference_in_command.golden │ │ ├── TestReference-reference_in_dependency.golden │ │ ├── TestReference-reference_using_templating_resolver.golden │ │ └── TestReference-reference_using_templating_resolver_and_dynamic_var.golden ├── vars │ ├── .env │ ├── .gitignore │ ├── Taskfile.yml │ ├── any │ │ ├── Taskfile.yml │ │ ├── example.json │ │ └── example.yaml │ └── testdata │ │ └── TestVars.golden ├── version │ ├── v1 │ │ └── Taskfile.yml │ ├── v2 │ │ └── Taskfile.yml │ └── v3 │ │ └── Taskfile.yml ├── watch │ ├── .gitignore │ └── Taskfile.yaml └── wildcards │ └── Taskfile.yml ├── variables.go ├── watch.go ├── watch_test.go └── website ├── .gitignore ├── .nojekyll ├── Taskfile.yml ├── babel.config.ts ├── blog ├── 2023-09-02-introducing-experiments.mdx ├── 2024-05-09-any-variables.mdx └── authors.yml ├── constants.ts ├── docs ├── changelog.mdx ├── community.mdx ├── contributing.mdx ├── deprecations │ ├── completion_scripts.mdx │ ├── deprecations.mdx │ ├── template.mdx │ ├── template_functions.mdx │ └── version_2_schema.mdx ├── experiments │ ├── env_precedence.mdx │ ├── experiments.mdx │ ├── gentle_force.mdx │ ├── remote_taskfiles.mdx │ └── template.mdx ├── faq.mdx ├── getting_started.mdx ├── installation.mdx ├── integrations.mdx ├── intro.mdx ├── reference │ ├── _category_.yml │ ├── cli.mdx │ ├── environment.mdx │ ├── package.mdx │ ├── schema.mdx │ └── templating.mdx ├── releasing.mdx ├── styleguide.mdx ├── taskfile_versions.mdx └── usage.mdx ├── docusaurus.config.ts ├── package.json ├── prettier.config.js ├── sidebars.ts ├── src ├── components │ └── .keep ├── css │ ├── carbon.css │ └── custom.css ├── pages │ └── donate.md └── themes │ ├── prismDark.js │ └── prismLight.js ├── static ├── .nojekyll ├── CNAME ├── Taskfile.yml ├── img │ ├── appwrite.svg │ ├── devowl.io.svg │ ├── favicon.ico │ ├── icon-bluesky.svg │ ├── icon-discord.svg │ ├── icon-github.svg │ ├── icon-mastodon.svg │ ├── icon-twitter.svg │ ├── logo.png │ ├── logo.svg │ ├── logo_mono.svg │ ├── og-image.png │ └── pix.png ├── install.sh ├── js │ └── carbon.js ├── next-schema-taskrc.json ├── next-schema.json ├── schema-taskrc.json └── schema.json ├── tsconfig.json ├── versioned_docs └── version-latest │ ├── changelog.mdx │ ├── community.mdx │ ├── contributing.mdx │ ├── deprecations │ ├── completion_scripts.mdx │ ├── deprecations.mdx │ ├── template.mdx │ ├── template_functions.mdx │ └── version_2_schema.mdx │ ├── experiments │ ├── env_precedence.mdx │ ├── experiments.mdx │ ├── gentle_force.mdx │ ├── remote_taskfiles.mdx │ └── template.mdx │ ├── faq.mdx │ ├── getting_started.mdx │ ├── installation.mdx │ ├── integrations.mdx │ ├── intro.mdx │ ├── reference │ ├── _category_.yml │ ├── cli.mdx │ ├── environment.mdx │ ├── package.mdx │ ├── schema.mdx │ └── templating.mdx │ ├── releasing.mdx │ ├── styleguide.mdx │ ├── taskfile_versions.mdx │ └── usage.mdx ├── versioned_sidebars └── version-latest-sidebars.json ├── versions.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | insert_final_newline = true 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | indent_style = tab 10 | 11 | [*.{md,mdx,yml,yaml,json,toml,htm,html,js,ts,css,svg,sh,bash,fish}] 12 | indent_style = space 13 | indent_size = 2 14 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.mdx -linguist-detectable 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: '🔌 Task for Visual Studio Code' 4 | url: https://github.com/go-task/vscode-task 5 | about: 'Issues related to the Visual Studio Code extension should be opened here.' 6 | - name: '💬 Help forum on Discord' 7 | url: https://discord.com/channels/974121106208354339/1025054680289660989 8 | about: 'The #help channel on our Discord is the best way to get help from the community.' 9 | - name: '❓ Questions, Ideas and General Discussions' 10 | url: https://github.com/go-task/task/discussions 11 | about: 'Ask questions and discuss general ideas with the community.' 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: '✨ Feature Request' 2 | description: Suggest a new feature or enhancement for Task. 3 | labels: ['state: needs-triage'] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for your feature request! 9 | 10 | 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. 11 | If your request is more of an idea than a feature request, consider opening a [discussion](https://github.com/go-task/task/discussions) instead. 12 | 13 | - type: textarea 14 | id: description 15 | attributes: 16 | label: Description 17 | description: Describe the feature/enhancement you want to see in Task. 18 | placeholder: | 19 | - Give a general overview of the feature/enhancement. 20 | - Explain problem is the change trying to solve. 21 | - Give examples of how you would use the feature. 22 | validations: 23 | required: true 24 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended", 5 | "group:allNonMajor", 6 | "schedule:weekly", 7 | ":semanticCommitTypeAll(chore)" 8 | ], 9 | "mode": "full", 10 | "addLabels":["area: dependencies"], 11 | "packageRules": [ 12 | { 13 | "matchManagers": ["github-actions"], 14 | "addLabels": ["area: github actions"] 15 | }, 16 | { 17 | "matchCategories": ["js", "node"], 18 | "addLabels": ["lang: javascript"] 19 | }, 20 | { 21 | "matchCategories": ["golang"], 22 | "addLabels": ["lang: go"] 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /.github/workflows/issue-closed.yml: -------------------------------------------------------------------------------- 1 | name: issue closed 2 | 3 | on: 4 | issues: 5 | types: [closed] 6 | 7 | jobs: 8 | issue-closed: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/github-script@v7 12 | with: 13 | github-token: ${{secrets.GH_PAT}} 14 | script: | 15 | const labels = await github.paginate( 16 | github.rest.issues.listLabelsOnIssue, { 17 | issue_number: context.issue.number, 18 | owner: context.repo.owner, 19 | repo: context.repo.repo, 20 | } 21 | ) 22 | if (labels.find(label => label.name === 'state: needs triage')) { 23 | github.rest.issues.removeLabel({ 24 | owner: context.repo.owner, 25 | repo: context.repo.repo, 26 | issue_number: context.issue.number, 27 | name: 'state: needs triage' 28 | }) 29 | } 30 | -------------------------------------------------------------------------------- /.github/workflows/issue-needs-triage.yml: -------------------------------------------------------------------------------- 1 | name: issue needs triage 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | issue-needs-triage: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/github-script@v7 12 | with: 13 | github-token: ${{secrets.GH_PAT}} 14 | script: | 15 | const labels = await github.paginate( 16 | github.rest.issues.listLabelsOnIssue, { 17 | issue_number: context.issue.number, 18 | owner: context.repo.owner, 19 | repo: context.repo.repo, 20 | } 21 | ) 22 | if (labels.length === 0) { 23 | github.rest.issues.addLabels({ 24 | issue_number: context.issue.number, 25 | owner: context.repo.owner, 26 | repo: context.repo.repo, 27 | labels: ['state: needs triage'] 28 | }) 29 | } 30 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: goreleaser 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | jobs: 9 | goreleaser: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Set up Go 18 | uses: actions/setup-go@v5 19 | with: 20 | go-version: 1.24.x 21 | 22 | - name: Run GoReleaser 23 | uses: goreleaser/goreleaser-action@v6 24 | with: 25 | distribution: goreleaser-pro 26 | version: latest 27 | args: release --clean 28 | env: 29 | GITHUB_TOKEN: ${{secrets.GH_PAT}} 30 | GORELEASER_KEY: ${{secrets.GORELEASER_KEY}} 31 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | pull_request: 5 | push: 6 | tags: 7 | - v* 8 | branches: 9 | - main 10 | 11 | jobs: 12 | test: 13 | name: Test 14 | strategy: 15 | matrix: 16 | go-version: [1.23.x, 1.24.x] 17 | platform: [ubuntu-latest, macos-latest, windows-latest] 18 | runs-on: ${{matrix.platform}} 19 | steps: 20 | - name: Set up Go ${{matrix.go-version}} 21 | uses: actions/setup-go@v5 22 | with: 23 | go-version: ${{matrix.go-version}} 24 | id: go 25 | 26 | - name: Check out code into the Go module directory 27 | uses: actions/checkout@v4 28 | 29 | - name: Download Go modules 30 | run: go mod download 31 | env: 32 | GOPROXY: https://proxy.golang.org 33 | 34 | - name: Build 35 | run: go build -o ./bin/task -v ./cmd/task 36 | 37 | - name: Test 38 | run: ./bin/task test --output=group --output-group-begin='::group::{{.TASK}}' --output-group-end='::endgroup::' 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | 7 | # Test binary, build with `go test -c` 8 | *.test 9 | 10 | # Output of the go coverage tool, specifically when used with LiteIDE 11 | *.out 12 | 13 | # Graphvis files 14 | *.gv 15 | 16 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 17 | .glide/ 18 | 19 | ./task 20 | .task 21 | dist/ 22 | 23 | .DS_Store 24 | 25 | # editors 26 | .idea/ 27 | .vscode/settings.json 28 | .fleet/ 29 | 30 | # exuberant ctags 31 | tags 32 | 33 | /bin/* 34 | !/bin/.keep 35 | /testdata/vars/v1 36 | /tmp 37 | node_modules 38 | -------------------------------------------------------------------------------- /.mockery.yaml: -------------------------------------------------------------------------------- 1 | all: False 2 | template: testify 3 | filename: '{{base (trimSuffix ".go" .InterfaceFile)}}_mock.go' 4 | packages: 5 | github.com/go-task/task/v3/internal/fingerprint: 6 | interfaces: 7 | SourcesCheckable: 8 | StatusCheckable: 9 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 22.16.0 2 | -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | trailingComma: none 2 | singleQuote: true 3 | overrides: 4 | - files: "*.md" 5 | options: 6 | printWidth: 80 7 | proseWrap: always 8 | -------------------------------------------------------------------------------- /.taskrc.yml: -------------------------------------------------------------------------------- 1 | experiments: 2 | GENTLE_FORCE: 0 3 | REMOTE_TASKFILES: 0 4 | ENV_PRECEDENCE: 0 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "editorconfig.editorconfig", 4 | "golang.go", 5 | "task.vscode-task" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /.vscode/settings-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "yaml.schemas": { 3 | "./website/static/schema.json": [ 4 | "Taskfile.yml", 5 | "tmp/**/*.yml" 6 | ] 7 | }, 8 | "search.exclude": { 9 | "**/versioned_docs": true, 10 | "**/versioned_sidesbars": true, 11 | "**/i18n": true 12 | }, 13 | "gopls": { 14 | "formatting.local": "github.com/go-task" 15 | }, 16 | "go.formatTool": "gofumpt" 17 | } 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Andrey Nering 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |

Task

7 | 8 |

9 | Task is a task runner / build tool that aims to be simpler and easier to use than, for example, GNU Make. 10 |

11 | 12 |

13 | Installation | Documentation | Twitter | Bluesky | Mastodon | Discord 14 |

15 | 16 |

Gold Sponsors

17 | 18 | 19 | 20 | 25 | 26 |
21 | 22 | 23 | 24 |
27 |
28 | -------------------------------------------------------------------------------- /bin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/bin/.keep -------------------------------------------------------------------------------- /call.go: -------------------------------------------------------------------------------- 1 | package task 2 | 3 | import "github.com/go-task/task/v3/taskfile/ast" 4 | 5 | // Call is the parameters to a task call 6 | type Call struct { 7 | Task string 8 | Vars *ast.Vars 9 | Silent bool 10 | Indirect bool // True if the task was called by another task 11 | } 12 | -------------------------------------------------------------------------------- /cmd/tmp/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "net/http" 7 | "time" 8 | ) 9 | 10 | func main() { 11 | ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) 12 | defer cancel() 13 | if err := run(ctx); err != nil { 14 | fmt.Println(ctx.Err()) 15 | fmt.Println(err) 16 | } 17 | } 18 | 19 | func run(ctx context.Context) error { 20 | req, err := http.NewRequest("GET", "https://taskfile.dev/schema.json", nil) 21 | if err != nil { 22 | fmt.Println(1) 23 | return err 24 | } 25 | 26 | resp, err := http.DefaultClient.Do(req.WithContext(ctx)) 27 | if err != nil { 28 | if ctx.Err() != nil { 29 | fmt.Println(2) 30 | return err 31 | } 32 | fmt.Println(3) 33 | return err 34 | } 35 | defer resp.Body.Close() 36 | 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /completion.go: -------------------------------------------------------------------------------- 1 | package task 2 | 3 | import ( 4 | _ "embed" 5 | "fmt" 6 | ) 7 | 8 | //go:embed completion/bash/task.bash 9 | var completionBash string 10 | 11 | //go:embed completion/fish/task.fish 12 | var completionFish string 13 | 14 | //go:embed completion/ps/task.ps1 15 | var completionPowershell string 16 | 17 | //go:embed completion/zsh/_task 18 | var completionZsh string 19 | 20 | func Completion(completion string) (string, error) { 21 | // Get the file extension for the selected shell 22 | switch completion { 23 | case "bash": 24 | return completionBash, nil 25 | case "fish": 26 | return completionFish, nil 27 | case "powershell": 28 | return completionPowershell, nil 29 | case "zsh": 30 | return completionZsh, nil 31 | default: 32 | return "", fmt.Errorf("unknown shell: %s", completion) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /concurrency.go: -------------------------------------------------------------------------------- 1 | package task 2 | 3 | func (e *Executor) acquireConcurrencyLimit() func() { 4 | if e.concurrencySemaphore == nil { 5 | return emptyFunc 6 | } 7 | 8 | e.concurrencySemaphore <- struct{}{} 9 | return func() { 10 | <-e.concurrencySemaphore 11 | } 12 | } 13 | 14 | func (e *Executor) releaseConcurrencyLimit() func() { 15 | if e.concurrencySemaphore == nil { 16 | return emptyFunc 17 | } 18 | 19 | <-e.concurrencySemaphore 20 | return func() { 21 | e.concurrencySemaphore <- struct{}{} 22 | } 23 | } 24 | 25 | func emptyFunc() {} 26 | -------------------------------------------------------------------------------- /errors/errors_taskrc.go: -------------------------------------------------------------------------------- 1 | package errors 2 | 3 | import "fmt" 4 | 5 | type TaskRCNotFoundError struct { 6 | URI string 7 | Walk bool 8 | } 9 | 10 | func (err TaskRCNotFoundError) Error() string { 11 | var walkText string 12 | if err.Walk { 13 | walkText = " (or any of the parent directories)" 14 | } 15 | return fmt.Sprintf(`task: No Task config file found at %q%s`, err.URI, walkText) 16 | } 17 | 18 | func (err TaskRCNotFoundError) Code() int { 19 | return CodeTaskRCNotFoundError 20 | } 21 | -------------------------------------------------------------------------------- /experiments/errors.go: -------------------------------------------------------------------------------- 1 | package experiments 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | "strings" 7 | 8 | "github.com/go-task/task/v3/internal/slicesext" 9 | ) 10 | 11 | type InvalidValueError struct { 12 | Name string 13 | AllowedValues []int 14 | Value int 15 | } 16 | 17 | func (err InvalidValueError) Error() string { 18 | return fmt.Sprintf( 19 | "task: Experiment %q has an invalid value %q (allowed values: %s)", 20 | err.Name, 21 | err.Value, 22 | strings.Join(slicesext.Convert(err.AllowedValues, strconv.Itoa), ", "), 23 | ) 24 | } 25 | 26 | type InactiveError struct { 27 | Name string 28 | } 29 | 30 | func (err InactiveError) Error() string { 31 | return fmt.Sprintf( 32 | "task: Experiment %q is inactive and cannot be enabled", 33 | err.Name, 34 | ) 35 | } 36 | -------------------------------------------------------------------------------- /hash.go: -------------------------------------------------------------------------------- 1 | package task 2 | 3 | import ( 4 | "cmp" 5 | "fmt" 6 | 7 | "github.com/go-task/task/v3/internal/hash" 8 | "github.com/go-task/task/v3/taskfile/ast" 9 | ) 10 | 11 | func (e *Executor) GetHash(t *ast.Task) (string, error) { 12 | r := cmp.Or(t.Run, e.Taskfile.Run) 13 | var h hash.HashFunc 14 | switch r { 15 | case "always": 16 | h = hash.Empty 17 | case "once": 18 | h = hash.Name 19 | case "when_changed": 20 | h = hash.Hash 21 | default: 22 | return "", fmt.Errorf(`task: invalid run "%s"`, r) 23 | } 24 | return h(t) 25 | } 26 | -------------------------------------------------------------------------------- /init.go: -------------------------------------------------------------------------------- 1 | package task 2 | 3 | import ( 4 | _ "embed" 5 | "os" 6 | 7 | "github.com/go-task/task/v3/errors" 8 | "github.com/go-task/task/v3/internal/filepathext" 9 | ) 10 | 11 | const defaultTaskFilename = "Taskfile.yml" 12 | 13 | //go:embed taskfile/templates/default.yml 14 | var DefaultTaskfile string 15 | 16 | // InitTaskfile creates a new Taskfile at path. 17 | // 18 | // path can be either a file path or a directory path. 19 | // If path is a directory, path/Taskfile.yml will be created. 20 | // 21 | // The final file path is always returned and may be different from the input path. 22 | func InitTaskfile(path string) (string, error) { 23 | fi, err := os.Stat(path) 24 | if err == nil && !fi.IsDir() { 25 | return path, errors.TaskfileAlreadyExistsError{} 26 | } 27 | 28 | if fi != nil && fi.IsDir() { 29 | path = filepathext.SmartJoin(path, defaultTaskFilename) 30 | // path was a directory, so check if Taskfile.yml exists in it 31 | if _, err := os.Stat(path); err == nil { 32 | return path, errors.TaskfileAlreadyExistsError{} 33 | } 34 | } 35 | 36 | if err := os.WriteFile(path, []byte(DefaultTaskfile), 0o644); err != nil { 37 | return path, err 38 | } 39 | 40 | return path, nil 41 | } 42 | -------------------------------------------------------------------------------- /init_test.go: -------------------------------------------------------------------------------- 1 | package task_test 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/go-task/task/v3" 8 | "github.com/go-task/task/v3/internal/filepathext" 9 | ) 10 | 11 | func TestInitDir(t *testing.T) { 12 | t.Parallel() 13 | 14 | const dir = "testdata/init" 15 | file := filepathext.SmartJoin(dir, "Taskfile.yml") 16 | 17 | _ = os.Remove(file) 18 | if _, err := os.Stat(file); err == nil { 19 | t.Errorf("Taskfile.yml should not exist") 20 | } 21 | 22 | if _, err := task.InitTaskfile(dir); err != nil { 23 | t.Error(err) 24 | } 25 | 26 | if _, err := os.Stat(file); err != nil { 27 | t.Errorf("Taskfile.yml should exist") 28 | } 29 | 30 | _ = os.Remove(file) 31 | } 32 | 33 | func TestInitFile(t *testing.T) { 34 | t.Parallel() 35 | 36 | const dir = "testdata/init" 37 | file := filepathext.SmartJoin(dir, "Tasks.yml") 38 | 39 | _ = os.Remove(file) 40 | if _, err := os.Stat(file); err == nil { 41 | t.Errorf("Tasks.yml should not exist") 42 | } 43 | 44 | if _, err := task.InitTaskfile(file); err != nil { 45 | t.Error(err) 46 | } 47 | 48 | if _, err := os.Stat(file); err != nil { 49 | t.Errorf("Tasks.yml should exist") 50 | } 51 | _ = os.Remove(file) 52 | } 53 | -------------------------------------------------------------------------------- /internal/editors/output.go: -------------------------------------------------------------------------------- 1 | package editors 2 | 3 | type ( 4 | // Taskfile wraps task list output for use in editor integrations (e.g. VSCode, etc) 5 | Taskfile struct { 6 | Tasks []Task `json:"tasks"` 7 | Location string `json:"location"` 8 | } 9 | // Task describes a single task 10 | Task struct { 11 | Name string `json:"name"` 12 | Task string `json:"task"` 13 | Desc string `json:"desc"` 14 | Summary string `json:"summary"` 15 | Aliases []string `json:"aliases"` 16 | UpToDate bool `json:"up_to_date"` 17 | Location *Location `json:"location"` 18 | } 19 | // Location describes a task's location in a taskfile 20 | Location struct { 21 | Line int `json:"line"` 22 | Column int `json:"column"` 23 | Taskfile string `json:"taskfile"` 24 | } 25 | ) 26 | -------------------------------------------------------------------------------- /internal/execext/devnull.go: -------------------------------------------------------------------------------- 1 | package execext 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | var _ io.ReadWriteCloser = devNull{} 8 | 9 | type devNull struct{} 10 | 11 | func (devNull) Read(p []byte) (int, error) { return 0, io.EOF } 12 | func (devNull) Write(p []byte) (int, error) { return len(p), nil } 13 | func (devNull) Close() error { return nil } 14 | -------------------------------------------------------------------------------- /internal/fingerprint/checker.go: -------------------------------------------------------------------------------- 1 | package fingerprint 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/go-task/task/v3/taskfile/ast" 7 | ) 8 | 9 | // StatusCheckable defines any type that can check if the status of a task is up-to-date. 10 | type StatusCheckable interface { 11 | IsUpToDate(ctx context.Context, t *ast.Task) (bool, error) 12 | } 13 | 14 | // SourcesCheckable defines any type that can check if the sources of a task are up-to-date. 15 | type SourcesCheckable interface { 16 | IsUpToDate(t *ast.Task) (bool, error) 17 | Value(t *ast.Task) (any, error) 18 | OnError(t *ast.Task) error 19 | Kind() string 20 | } 21 | -------------------------------------------------------------------------------- /internal/fingerprint/glob.go: -------------------------------------------------------------------------------- 1 | package fingerprint 2 | 3 | import ( 4 | "os" 5 | "sort" 6 | 7 | "github.com/go-task/task/v3/internal/execext" 8 | "github.com/go-task/task/v3/internal/filepathext" 9 | "github.com/go-task/task/v3/taskfile/ast" 10 | ) 11 | 12 | func Globs(dir string, globs []*ast.Glob) ([]string, error) { 13 | resultMap := make(map[string]bool) 14 | for _, g := range globs { 15 | matches, err := glob(dir, g.Glob) 16 | if err != nil { 17 | continue 18 | } 19 | for _, match := range matches { 20 | resultMap[match] = !g.Negate 21 | } 22 | } 23 | return collectKeys(resultMap), nil 24 | } 25 | 26 | func glob(dir string, g string) ([]string, error) { 27 | g = filepathext.SmartJoin(dir, g) 28 | 29 | fs, err := execext.ExpandFields(g) 30 | if err != nil { 31 | return nil, err 32 | } 33 | 34 | results := make(map[string]bool, len(fs)) 35 | 36 | for _, f := range fs { 37 | info, err := os.Stat(f) 38 | if err != nil { 39 | return nil, err 40 | } 41 | if info.IsDir() { 42 | continue 43 | } 44 | results[f] = true 45 | } 46 | return collectKeys(results), nil 47 | } 48 | 49 | func collectKeys(m map[string]bool) []string { 50 | keys := make([]string, 0, len(m)) 51 | for k, v := range m { 52 | if v { 53 | keys = append(keys, k) 54 | } 55 | } 56 | sort.Strings(keys) 57 | return keys 58 | } 59 | -------------------------------------------------------------------------------- /internal/fingerprint/sources.go: -------------------------------------------------------------------------------- 1 | package fingerprint 2 | 3 | import "fmt" 4 | 5 | func NewSourcesChecker(method, tempDir string, dry bool) (SourcesCheckable, error) { 6 | switch method { 7 | case "timestamp": 8 | return NewTimestampChecker(tempDir, dry), nil 9 | case "checksum": 10 | return NewChecksumChecker(tempDir, dry), nil 11 | case "none": 12 | return NoneChecker{}, nil 13 | default: 14 | return nil, fmt.Errorf(`task: invalid method "%s"`, method) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /internal/fingerprint/sources_checksum_test.go: -------------------------------------------------------------------------------- 1 | package fingerprint 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestNormalizeFilename(t *testing.T) { 10 | t.Parallel() 11 | 12 | tests := []struct { 13 | In, Out string 14 | }{ 15 | {"foobarbaz", "foobarbaz"}, 16 | {"foo/bar/baz", "foo-bar-baz"}, 17 | {"foo@bar/baz", "foo-bar-baz"}, 18 | {"foo1bar2baz3", "foo1bar2baz3"}, 19 | } 20 | for _, test := range tests { 21 | assert.Equal(t, test.Out, normalizeFilename(test.In)) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /internal/fingerprint/sources_none.go: -------------------------------------------------------------------------------- 1 | package fingerprint 2 | 3 | import "github.com/go-task/task/v3/taskfile/ast" 4 | 5 | // NoneChecker is a no-op Checker. 6 | // It will always report that the task is not up-to-date. 7 | type NoneChecker struct{} 8 | 9 | func (NoneChecker) IsUpToDate(t *ast.Task) (bool, error) { 10 | return false, nil 11 | } 12 | 13 | func (NoneChecker) Value(t *ast.Task) (any, error) { 14 | return "", nil 15 | } 16 | 17 | func (NoneChecker) OnError(t *ast.Task) error { 18 | return nil 19 | } 20 | 21 | func (NoneChecker) Kind() string { 22 | return "none" 23 | } 24 | -------------------------------------------------------------------------------- /internal/fingerprint/status.go: -------------------------------------------------------------------------------- 1 | package fingerprint 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/go-task/task/v3/internal/env" 7 | "github.com/go-task/task/v3/internal/execext" 8 | "github.com/go-task/task/v3/internal/logger" 9 | "github.com/go-task/task/v3/taskfile/ast" 10 | ) 11 | 12 | type StatusChecker struct { 13 | logger *logger.Logger 14 | } 15 | 16 | func NewStatusChecker(logger *logger.Logger) StatusCheckable { 17 | return &StatusChecker{ 18 | logger: logger, 19 | } 20 | } 21 | 22 | func (checker *StatusChecker) IsUpToDate(ctx context.Context, t *ast.Task) (bool, error) { 23 | for _, s := range t.Status { 24 | err := execext.RunCommand(ctx, &execext.RunCommandOptions{ 25 | Command: s, 26 | Dir: t.Dir, 27 | Env: env.Get(t), 28 | }) 29 | if err != nil { 30 | checker.logger.VerboseOutf(logger.Yellow, "task: status command %s exited non-zero: %s\n", s, err) 31 | return false, nil 32 | } 33 | checker.logger.VerboseOutf(logger.Yellow, "task: status command %s exited zero\n", s) 34 | } 35 | return true, nil 36 | } 37 | -------------------------------------------------------------------------------- /internal/fsext/testdata/bar.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/internal/fsext/testdata/bar.txt -------------------------------------------------------------------------------- /internal/fsext/testdata/foo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/internal/fsext/testdata/foo.txt -------------------------------------------------------------------------------- /internal/fsnotifyext/fsnotify_dedup.go: -------------------------------------------------------------------------------- 1 | package fsnotifyext 2 | 3 | import ( 4 | "math" 5 | "time" 6 | 7 | "github.com/fsnotify/fsnotify" 8 | ) 9 | 10 | type Deduper struct { 11 | w *fsnotify.Watcher 12 | waitTime time.Duration 13 | } 14 | 15 | func NewDeduper(w *fsnotify.Watcher, waitTime time.Duration) *Deduper { 16 | return &Deduper{ 17 | w: w, 18 | waitTime: waitTime, 19 | } 20 | } 21 | 22 | // GetChan returns a chan of deduplicated [fsnotify.Event]. 23 | // 24 | // [fsnotify.Chmod] operations will be skipped. 25 | func (d *Deduper) GetChan() <-chan fsnotify.Event { 26 | channel := make(chan fsnotify.Event) 27 | 28 | go func() { 29 | timers := make(map[string]*time.Timer) 30 | for { 31 | event, ok := <-d.w.Events 32 | switch { 33 | case !ok: 34 | return 35 | case event.Has(fsnotify.Chmod): 36 | continue 37 | } 38 | 39 | timer, ok := timers[event.String()] 40 | if !ok { 41 | timer = time.AfterFunc(math.MaxInt64, func() { channel <- event }) 42 | timer.Stop() 43 | timers[event.String()] = timer 44 | } 45 | 46 | timer.Reset(d.waitTime) 47 | } 48 | }() 49 | 50 | return channel 51 | } 52 | -------------------------------------------------------------------------------- /internal/hash/hash.go: -------------------------------------------------------------------------------- 1 | package hash 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/mitchellh/hashstructure/v2" 7 | 8 | "github.com/go-task/task/v3/taskfile/ast" 9 | ) 10 | 11 | type HashFunc func(*ast.Task) (string, error) 12 | 13 | func Empty(*ast.Task) (string, error) { 14 | return "", nil 15 | } 16 | 17 | func Name(t *ast.Task) (string, error) { 18 | return fmt.Sprintf("%s:%s", t.Location.Taskfile, t.LocalName()), nil 19 | } 20 | 21 | func Hash(t *ast.Task) (string, error) { 22 | h, err := hashstructure.Hash(t, hashstructure.FormatV2, nil) 23 | return fmt.Sprintf("%s:%d", t.Task, h), err 24 | } 25 | -------------------------------------------------------------------------------- /internal/output/group.go: -------------------------------------------------------------------------------- 1 | package output 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | 7 | "github.com/go-task/task/v3/internal/templater" 8 | ) 9 | 10 | type Group struct { 11 | Begin, End string 12 | ErrorOnly bool 13 | } 14 | 15 | func (g Group) WrapWriter(stdOut, _ io.Writer, _ string, cache *templater.Cache) (io.Writer, io.Writer, CloseFunc) { 16 | gw := &groupWriter{writer: stdOut} 17 | if g.Begin != "" { 18 | gw.begin = templater.Replace(g.Begin, cache) + "\n" 19 | } 20 | if g.End != "" { 21 | gw.end = templater.Replace(g.End, cache) + "\n" 22 | } 23 | return gw, gw, func(err error) error { 24 | if g.ErrorOnly && err == nil { 25 | return nil 26 | } 27 | 28 | return gw.close() 29 | } 30 | } 31 | 32 | type groupWriter struct { 33 | writer io.Writer 34 | buff bytes.Buffer 35 | begin, end string 36 | } 37 | 38 | func (gw *groupWriter) Write(p []byte) (int, error) { 39 | return gw.buff.Write(p) 40 | } 41 | 42 | func (gw *groupWriter) close() error { 43 | if gw.buff.Len() == 0 { 44 | // don't print begin/end messages if there's no buffered entries 45 | return nil 46 | } 47 | if _, err := io.WriteString(gw.writer, gw.begin); err != nil { 48 | return err 49 | } 50 | gw.buff.WriteString(gw.end) 51 | _, err := io.Copy(gw.writer, &gw.buff) 52 | return err 53 | } 54 | -------------------------------------------------------------------------------- /internal/output/interleaved.go: -------------------------------------------------------------------------------- 1 | package output 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/go-task/task/v3/internal/templater" 7 | ) 8 | 9 | type Interleaved struct{} 10 | 11 | func (Interleaved) WrapWriter(stdOut, stdErr io.Writer, _ string, _ *templater.Cache) (io.Writer, io.Writer, CloseFunc) { 12 | return stdOut, stdErr, func(error) error { return nil } 13 | } 14 | -------------------------------------------------------------------------------- /internal/output/output.go: -------------------------------------------------------------------------------- 1 | package output 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | 7 | "github.com/go-task/task/v3/internal/logger" 8 | "github.com/go-task/task/v3/internal/templater" 9 | "github.com/go-task/task/v3/taskfile/ast" 10 | ) 11 | 12 | type Output interface { 13 | WrapWriter(stdOut, stdErr io.Writer, prefix string, cache *templater.Cache) (io.Writer, io.Writer, CloseFunc) 14 | } 15 | 16 | type CloseFunc func(err error) error 17 | 18 | // Build the Output for the requested ast.Output. 19 | func BuildFor(o *ast.Output, logger *logger.Logger) (Output, error) { 20 | switch o.Name { 21 | case "interleaved", "": 22 | if err := checkOutputGroupUnset(o); err != nil { 23 | return nil, err 24 | } 25 | return Interleaved{}, nil 26 | case "group": 27 | return Group{ 28 | Begin: o.Group.Begin, 29 | End: o.Group.End, 30 | ErrorOnly: o.Group.ErrorOnly, 31 | }, nil 32 | case "prefixed": 33 | if err := checkOutputGroupUnset(o); err != nil { 34 | return nil, err 35 | } 36 | return NewPrefixed(logger), nil 37 | default: 38 | return nil, fmt.Errorf(`task: output style %q not recognized`, o.Name) 39 | } 40 | } 41 | 42 | func checkOutputGroupUnset(o *ast.Output) error { 43 | if o.Group.IsSet() { 44 | return fmt.Errorf("task: output style %q does not support the group begin/end parameter", o.Name) 45 | } 46 | return nil 47 | } 48 | -------------------------------------------------------------------------------- /internal/slicesext/slicesext.go: -------------------------------------------------------------------------------- 1 | package slicesext 2 | 3 | import ( 4 | "cmp" 5 | "slices" 6 | ) 7 | 8 | func UniqueJoin[T cmp.Ordered](ss ...[]T) []T { 9 | var length int 10 | for _, s := range ss { 11 | length += len(s) 12 | } 13 | r := make([]T, length) 14 | var i int 15 | for _, s := range ss { 16 | i += copy(r[i:], s) 17 | } 18 | slices.Sort(r) 19 | return slices.Compact(r) 20 | } 21 | 22 | func Convert[T, U any](s []T, f func(T) U) []U { 23 | // Create a new slice with the same length as the input slice 24 | result := make([]U, len(s)) 25 | 26 | // Convert each element using the provided function 27 | for i, v := range s { 28 | result[i] = f(v) 29 | } 30 | 31 | return result 32 | } 33 | -------------------------------------------------------------------------------- /internal/sysinfo/uid.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | 3 | package sysinfo 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | func Owner(path string) (int, error) { 11 | info, err := os.Stat(path) 12 | if err != nil { 13 | return 0, err 14 | } 15 | var uid int 16 | if stat, ok := info.Sys().(*syscall.Stat_t); ok { 17 | uid = int(stat.Uid) 18 | } else { 19 | uid = os.Getuid() 20 | } 21 | return uid, nil 22 | } 23 | -------------------------------------------------------------------------------- /internal/sysinfo/uid_win.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | 3 | package sysinfo 4 | 5 | // NOTE: This always returns -1 since there is currently no easy way to get 6 | // file owner information on Windows. 7 | func Owner(path string) (int, error) { 8 | return -1, nil 9 | } 10 | -------------------------------------------------------------------------------- /internal/term/term.go: -------------------------------------------------------------------------------- 1 | package term 2 | 3 | import ( 4 | "os" 5 | 6 | "golang.org/x/term" 7 | ) 8 | 9 | func IsTerminal() bool { 10 | return term.IsTerminal(int(os.Stdin.Fd())) && term.IsTerminal(int(os.Stdout.Fd())) 11 | } 12 | -------------------------------------------------------------------------------- /internal/version/version.txt: -------------------------------------------------------------------------------- 1 | 3.43.3 2 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@go-task/cli", 3 | "version": "3.43.3", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "@go-task/cli", 9 | "version": "3.26.0", 10 | "hasInstallScript": true, 11 | "license": "MIT", 12 | "dependencies": { 13 | "@go-task/go-npm": "^0.2.0" 14 | } 15 | }, 16 | "node_modules/@go-task/go-npm": { 17 | "version": "0.2.0", 18 | "resolved": "https://registry.npmjs.org/@go-task/go-npm/-/go-npm-0.2.0.tgz", 19 | "integrity": "sha512-vQbdtBvesHm8EUFHX8QKg4rbBodmu9VsAXH1ozpbiN5jdTMOYHTCMM31EurAYmY+rNNtxJQ4JGy6t383RPlqbw==", 20 | "bin": { 21 | "go-npm": "bin/index.js" 22 | } 23 | } 24 | }, 25 | "dependencies": { 26 | "@go-task/go-npm": { 27 | "version": "0.2.0", 28 | "resolved": "https://registry.npmjs.org/@go-task/go-npm/-/go-npm-0.2.0.tgz", 29 | "integrity": "sha512-vQbdtBvesHm8EUFHX8QKg4rbBodmu9VsAXH1ozpbiN5jdTMOYHTCMM31EurAYmY+rNNtxJQ4JGy6t383RPlqbw==" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@go-task/cli", 3 | "version": "3.43.3", 4 | "description": "A task runner / simpler Make alternative written in Go", 5 | "scripts": { 6 | "postinstall": "go-npm install", 7 | "preuninstall": "go-npm uninstall" 8 | }, 9 | "goBinary": { 10 | "name": "task", 11 | "path": "./bin", 12 | "url": "https://github.com/go-task/task/releases/download/v{{version}}/task_{{platform}}_{{arch}}{{archive_ext}}" 13 | }, 14 | "files": [], 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/go-task/task.git" 18 | }, 19 | "keywords": [ 20 | "task", 21 | "taskfile", 22 | "build-tool", 23 | "task-runner" 24 | ], 25 | "author": "The Task authors", 26 | "license": "MIT", 27 | "bugs": { 28 | "url": "https://github.com/go-task/task/issues" 29 | }, 30 | "homepage": "https://taskfile.dev", 31 | "dependencies": { 32 | "@go-task/go-npm": "^0.2.0" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /precondition.go: -------------------------------------------------------------------------------- 1 | package task 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/go-task/task/v3/errors" 7 | "github.com/go-task/task/v3/internal/env" 8 | "github.com/go-task/task/v3/internal/execext" 9 | "github.com/go-task/task/v3/internal/logger" 10 | "github.com/go-task/task/v3/taskfile/ast" 11 | ) 12 | 13 | // ErrPreconditionFailed is returned when a precondition fails 14 | var ErrPreconditionFailed = errors.New("task: precondition not met") 15 | 16 | func (e *Executor) areTaskPreconditionsMet(ctx context.Context, t *ast.Task) (bool, error) { 17 | for _, p := range t.Preconditions { 18 | err := execext.RunCommand(ctx, &execext.RunCommandOptions{ 19 | Command: p.Sh, 20 | Dir: t.Dir, 21 | Env: env.Get(t), 22 | }) 23 | if err != nil { 24 | if !errors.Is(err, context.Canceled) { 25 | e.Logger.Errf(logger.Magenta, "task: %s\n", p.Msg) 26 | } 27 | return false, ErrPreconditionFailed 28 | } 29 | } 30 | 31 | return true, nil 32 | } 33 | -------------------------------------------------------------------------------- /signals.go: -------------------------------------------------------------------------------- 1 | package task 2 | 3 | import ( 4 | "os" 5 | "os/signal" 6 | "syscall" 7 | 8 | "github.com/go-task/task/v3/internal/logger" 9 | ) 10 | 11 | const maxInterruptSignals = 3 12 | 13 | // NOTE(@andreynering): This function intercepts SIGINT and SIGTERM signals 14 | // so the Task process is not killed immediately and processes running have 15 | // time to do cleanup work. 16 | func (e *Executor) InterceptInterruptSignals() { 17 | ch := make(chan os.Signal, maxInterruptSignals) 18 | signal.Notify(ch, os.Interrupt, syscall.SIGTERM) 19 | 20 | go func() { 21 | for i := range maxInterruptSignals { 22 | sig := <-ch 23 | 24 | if i+1 >= maxInterruptSignals { 25 | e.Logger.Errf(logger.Red, "task: Signal received for the third time: %q. Forcing shutdown\n", sig) 26 | os.Exit(1) 27 | } 28 | 29 | e.Logger.Outf(logger.Yellow, "task: Signal received: %q\n", sig) 30 | } 31 | }() 32 | } 33 | -------------------------------------------------------------------------------- /taskfile/ast/defer.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "gopkg.in/yaml.v3" 5 | 6 | "github.com/go-task/task/v3/errors" 7 | ) 8 | 9 | type Defer struct { 10 | Cmd string 11 | Task string 12 | Vars *Vars 13 | Silent bool 14 | } 15 | 16 | func (d *Defer) UnmarshalYAML(node *yaml.Node) error { 17 | switch node.Kind { 18 | 19 | case yaml.ScalarNode: 20 | var cmd string 21 | if err := node.Decode(&cmd); err != nil { 22 | return errors.NewTaskfileDecodeError(err, node) 23 | } 24 | d.Cmd = cmd 25 | return nil 26 | 27 | case yaml.MappingNode: 28 | var deferStruct struct { 29 | Defer string 30 | Task string 31 | Vars *Vars 32 | Silent bool 33 | } 34 | if err := node.Decode(&deferStruct); err != nil { 35 | return errors.NewTaskfileDecodeError(err, node) 36 | } 37 | d.Cmd = deferStruct.Defer 38 | d.Task = deferStruct.Task 39 | d.Vars = deferStruct.Vars 40 | d.Silent = deferStruct.Silent 41 | return nil 42 | } 43 | 44 | return errors.NewTaskfileDecodeError(nil, node).WithTypeMessage("defer") 45 | } 46 | -------------------------------------------------------------------------------- /taskfile/ast/dep.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "gopkg.in/yaml.v3" 5 | 6 | "github.com/go-task/task/v3/errors" 7 | ) 8 | 9 | // Dep is a task dependency 10 | type Dep struct { 11 | Task string 12 | For *For 13 | Vars *Vars 14 | Silent bool 15 | } 16 | 17 | func (d *Dep) DeepCopy() *Dep { 18 | if d == nil { 19 | return nil 20 | } 21 | return &Dep{ 22 | Task: d.Task, 23 | For: d.For.DeepCopy(), 24 | Vars: d.Vars.DeepCopy(), 25 | Silent: d.Silent, 26 | } 27 | } 28 | 29 | func (d *Dep) UnmarshalYAML(node *yaml.Node) error { 30 | switch node.Kind { 31 | 32 | case yaml.ScalarNode: 33 | var task string 34 | if err := node.Decode(&task); err != nil { 35 | return errors.NewTaskfileDecodeError(err, node) 36 | } 37 | d.Task = task 38 | return nil 39 | 40 | case yaml.MappingNode: 41 | var taskCall struct { 42 | Task string 43 | For *For 44 | Vars *Vars 45 | Silent bool 46 | } 47 | if err := node.Decode(&taskCall); err != nil { 48 | return errors.NewTaskfileDecodeError(err, node) 49 | } 50 | d.Task = taskCall.Task 51 | d.For = taskCall.For 52 | d.Vars = taskCall.Vars 53 | d.Silent = taskCall.Silent 54 | return nil 55 | } 56 | 57 | return errors.NewTaskfileDecodeError(nil, node).WithTypeMessage("dependency") 58 | } 59 | -------------------------------------------------------------------------------- /taskfile/ast/glob.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "gopkg.in/yaml.v3" 5 | 6 | "github.com/go-task/task/v3/errors" 7 | ) 8 | 9 | type Glob struct { 10 | Glob string 11 | Negate bool 12 | } 13 | 14 | func (g *Glob) UnmarshalYAML(node *yaml.Node) error { 15 | switch node.Kind { 16 | 17 | case yaml.ScalarNode: 18 | g.Glob = node.Value 19 | return nil 20 | 21 | case yaml.MappingNode: 22 | var glob struct { 23 | Exclude string 24 | } 25 | if err := node.Decode(&glob); err != nil { 26 | return errors.NewTaskfileDecodeError(err, node) 27 | } 28 | g.Glob = glob.Exclude 29 | g.Negate = true 30 | return nil 31 | } 32 | 33 | return errors.NewTaskfileDecodeError(nil, node).WithTypeMessage("glob") 34 | } 35 | -------------------------------------------------------------------------------- /taskfile/ast/location.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | type Location struct { 4 | Line int 5 | Column int 6 | Taskfile string 7 | } 8 | 9 | func (l *Location) DeepCopy() *Location { 10 | if l == nil { 11 | return nil 12 | } 13 | return &Location{ 14 | Line: l.Line, 15 | Column: l.Column, 16 | Taskfile: l.Taskfile, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /taskfile/ast/precondition.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "fmt" 5 | 6 | "gopkg.in/yaml.v3" 7 | 8 | "github.com/go-task/task/v3/errors" 9 | ) 10 | 11 | // Precondition represents a precondition necessary for a task to run 12 | type Precondition struct { 13 | Sh string 14 | Msg string 15 | } 16 | 17 | func (p *Precondition) DeepCopy() *Precondition { 18 | if p == nil { 19 | return nil 20 | } 21 | return &Precondition{ 22 | Sh: p.Sh, 23 | Msg: p.Msg, 24 | } 25 | } 26 | 27 | // UnmarshalYAML implements yaml.Unmarshaler interface. 28 | func (p *Precondition) UnmarshalYAML(node *yaml.Node) error { 29 | switch node.Kind { 30 | 31 | case yaml.ScalarNode: 32 | var cmd string 33 | if err := node.Decode(&cmd); err != nil { 34 | return errors.NewTaskfileDecodeError(err, node) 35 | } 36 | p.Sh = cmd 37 | p.Msg = fmt.Sprintf("`%s` failed", cmd) 38 | return nil 39 | 40 | case yaml.MappingNode: 41 | var sh struct { 42 | Sh string 43 | Msg string 44 | } 45 | if err := node.Decode(&sh); err != nil { 46 | return errors.NewTaskfileDecodeError(err, node) 47 | } 48 | p.Sh = sh.Sh 49 | p.Msg = sh.Msg 50 | if p.Msg == "" { 51 | p.Msg = fmt.Sprintf("%s failed", sh.Sh) 52 | } 53 | return nil 54 | } 55 | 56 | return errors.NewTaskfileDecodeError(nil, node).WithTypeMessage("precondition") 57 | } 58 | -------------------------------------------------------------------------------- /taskfile/ast/precondition_test.go: -------------------------------------------------------------------------------- 1 | package ast_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | "github.com/stretchr/testify/require" 8 | "gopkg.in/yaml.v3" 9 | 10 | "github.com/go-task/task/v3/taskfile/ast" 11 | ) 12 | 13 | func TestPreconditionParse(t *testing.T) { 14 | t.Parallel() 15 | 16 | tests := []struct { 17 | content string 18 | v any 19 | expected any 20 | }{ 21 | { 22 | "test -f foo.txt", 23 | &ast.Precondition{}, 24 | &ast.Precondition{Sh: `test -f foo.txt`, Msg: "`test -f foo.txt` failed"}, 25 | }, 26 | { 27 | "sh: '[ 1 = 0 ]'", 28 | &ast.Precondition{}, 29 | &ast.Precondition{Sh: "[ 1 = 0 ]", Msg: "[ 1 = 0 ] failed"}, 30 | }, 31 | { 32 | ` 33 | sh: "[ 1 = 2 ]" 34 | msg: "1 is not 2" 35 | `, 36 | &ast.Precondition{}, 37 | &ast.Precondition{Sh: "[ 1 = 2 ]", Msg: "1 is not 2"}, 38 | }, 39 | { 40 | ` 41 | sh: "[ 1 = 2 ]" 42 | msg: "1 is not 2" 43 | `, 44 | &ast.Precondition{}, 45 | &ast.Precondition{Sh: "[ 1 = 2 ]", Msg: "1 is not 2"}, 46 | }, 47 | } 48 | for _, test := range tests { 49 | err := yaml.Unmarshal([]byte(test.content), test.v) 50 | require.NoError(t, err) 51 | assert.Equal(t, test.expected, test.v) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /taskfile/ast/prompt.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "gopkg.in/yaml.v3" 5 | 6 | "github.com/go-task/task/v3/errors" 7 | ) 8 | 9 | type Prompt []string 10 | 11 | func (p *Prompt) UnmarshalYAML(node *yaml.Node) error { 12 | switch node.Kind { 13 | case yaml.ScalarNode: 14 | var str string 15 | if err := node.Decode(&str); err != nil { 16 | return errors.NewTaskfileDecodeError(err, node) 17 | } 18 | *p = []string{str} 19 | return nil 20 | case yaml.SequenceNode: 21 | var list []string 22 | if err := node.Decode(&list); err != nil { 23 | return errors.NewTaskfileDecodeError(err, node) 24 | } 25 | *p = list 26 | return nil 27 | } 28 | return errors.NewTaskfileDecodeError(nil, node).WithTypeMessage("prompt") 29 | } 30 | -------------------------------------------------------------------------------- /taskfile/ast/var.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import ( 4 | "gopkg.in/yaml.v3" 5 | 6 | "github.com/go-task/task/v3/errors" 7 | ) 8 | 9 | // Var represents either a static or dynamic variable. 10 | type Var struct { 11 | Value any 12 | Live any 13 | Sh *string 14 | Ref string 15 | Dir string 16 | } 17 | 18 | func (v *Var) UnmarshalYAML(node *yaml.Node) error { 19 | switch node.Kind { 20 | case yaml.MappingNode: 21 | key := node.Content[0].Value 22 | switch key { 23 | case "sh", "ref", "map": 24 | var m struct { 25 | Sh *string 26 | Ref string 27 | Map any 28 | } 29 | if err := node.Decode(&m); err != nil { 30 | return errors.NewTaskfileDecodeError(err, node) 31 | } 32 | v.Sh = m.Sh 33 | v.Ref = m.Ref 34 | v.Value = m.Map 35 | return nil 36 | default: 37 | return errors.NewTaskfileDecodeError(nil, node).WithMessage(`%q is not a valid variable type. Try "sh", "ref", "map" or using a scalar value`, key) 38 | } 39 | default: 40 | var value any 41 | if err := node.Decode(&value); err != nil { 42 | return errors.NewTaskfileDecodeError(err, node) 43 | } 44 | v.Value = value 45 | return nil 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /taskfile/dotenv.go: -------------------------------------------------------------------------------- 1 | package taskfile 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/joho/godotenv" 8 | 9 | "github.com/go-task/task/v3/internal/filepathext" 10 | "github.com/go-task/task/v3/internal/templater" 11 | "github.com/go-task/task/v3/taskfile/ast" 12 | ) 13 | 14 | func Dotenv(vars *ast.Vars, tf *ast.Taskfile, dir string) (*ast.Vars, error) { 15 | env := ast.NewVars() 16 | cache := &templater.Cache{Vars: vars} 17 | 18 | for _, dotEnvPath := range tf.Dotenv { 19 | dotEnvPath = templater.Replace(dotEnvPath, cache) 20 | if dotEnvPath == "" { 21 | continue 22 | } 23 | dotEnvPath = filepathext.SmartJoin(dir, dotEnvPath) 24 | 25 | if _, err := os.Stat(dotEnvPath); os.IsNotExist(err) { 26 | continue 27 | } 28 | 29 | envs, err := godotenv.Read(dotEnvPath) 30 | if err != nil { 31 | return nil, fmt.Errorf("error reading env file %s: %w", dotEnvPath, err) 32 | } 33 | for key, value := range envs { 34 | if _, ok := env.Get(key); !ok { 35 | env.Set(key, ast.Var{Value: value}) 36 | } 37 | } 38 | } 39 | 40 | return env, nil 41 | } 42 | -------------------------------------------------------------------------------- /taskfile/node_base.go: -------------------------------------------------------------------------------- 1 | package taskfile 2 | 3 | type ( 4 | NodeOption func(*baseNode) 5 | // baseNode is a generic node that implements the Parent() methods of the 6 | // NodeReader interface. It does not implement the Read() method and it 7 | // designed to be embedded in other node types so that this boilerplate code 8 | // does not need to be repeated. 9 | baseNode struct { 10 | parent Node 11 | dir string 12 | checksum string 13 | } 14 | ) 15 | 16 | func NewBaseNode(dir string, opts ...NodeOption) *baseNode { 17 | node := &baseNode{ 18 | parent: nil, 19 | dir: dir, 20 | } 21 | 22 | // Apply options 23 | for _, opt := range opts { 24 | opt(node) 25 | } 26 | 27 | return node 28 | } 29 | 30 | func WithParent(parent Node) NodeOption { 31 | return func(node *baseNode) { 32 | node.parent = parent 33 | } 34 | } 35 | 36 | func WithChecksum(checksum string) NodeOption { 37 | return func(node *baseNode) { 38 | node.checksum = checksum 39 | } 40 | } 41 | 42 | func (node *baseNode) Parent() Node { 43 | return node.parent 44 | } 45 | 46 | func (node *baseNode) Dir() string { 47 | return node.dir 48 | } 49 | 50 | func (node *baseNode) Checksum() string { 51 | return node.checksum 52 | } 53 | 54 | func (node *baseNode) Verify(checksum string) bool { 55 | return node.checksum == "" || node.checksum == checksum 56 | } 57 | -------------------------------------------------------------------------------- /taskfile/node_test.go: -------------------------------------------------------------------------------- 1 | package taskfile 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestScheme(t *testing.T) { 10 | t.Parallel() 11 | 12 | scheme, err := getScheme("https://github.com/foo/bar.git") 13 | assert.NoError(t, err) 14 | assert.Equal(t, "git", scheme) 15 | scheme, err = getScheme("https://github.com/foo/bar.git?ref=v1//taskfile/common.yml") 16 | assert.NoError(t, err) 17 | assert.Equal(t, "git", scheme) 18 | scheme, err = getScheme("git@github.com:foo/bar.git?ref=main//Taskfile.yml") 19 | assert.NoError(t, err) 20 | assert.Equal(t, "git", scheme) 21 | scheme, err = getScheme("https://github.com/foo/common.yml") 22 | assert.NoError(t, err) 23 | assert.Equal(t, "https", scheme) 24 | } 25 | -------------------------------------------------------------------------------- /taskfile/templates/default.yml: -------------------------------------------------------------------------------- 1 | # https://taskfile.dev 2 | 3 | version: '3' 4 | 5 | vars: 6 | GREETING: Hello, World! 7 | 8 | tasks: 9 | default: 10 | cmds: 11 | - echo "{{.GREETING}}" 12 | silent: true 13 | -------------------------------------------------------------------------------- /taskfile/themes/task.xml: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /taskrc/ast/taskrc.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import "github.com/Masterminds/semver/v3" 4 | 5 | type TaskRC struct { 6 | Version *semver.Version `yaml:"version"` 7 | Experiments map[string]int `yaml:"experiments"` 8 | } 9 | -------------------------------------------------------------------------------- /taskrc/node.go: -------------------------------------------------------------------------------- 1 | package taskrc 2 | 3 | import "github.com/go-task/task/v3/internal/fsext" 4 | 5 | type Node struct { 6 | entrypoint string 7 | dir string 8 | } 9 | 10 | func NewNode( 11 | entrypoint string, 12 | dir string, 13 | ) (*Node, error) { 14 | dir = fsext.DefaultDir(entrypoint, dir) 15 | var err error 16 | entrypoint, dir, err = fsext.Search(entrypoint, dir, defaultTaskRCs) 17 | if err != nil { 18 | return nil, err 19 | } 20 | return &Node{ 21 | entrypoint: entrypoint, 22 | dir: dir, 23 | }, nil 24 | } 25 | -------------------------------------------------------------------------------- /taskrc/taskrc.go: -------------------------------------------------------------------------------- 1 | package taskrc 2 | 3 | var defaultTaskRCs = []string{ 4 | ".taskrc.yml", 5 | ".taskrc.yaml", 6 | } 7 | -------------------------------------------------------------------------------- /testdata/alias/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: Taskfile2.yml 6 | aliases: [inc, i] 7 | 8 | tasks: 9 | foo: 10 | aliases: [f, x] 11 | cmds: 12 | - echo "foo" 13 | - task: b 14 | 15 | bar: 16 | aliases: [b, x] 17 | cmds: 18 | - echo "bar" 19 | - task: inc:q 20 | -------------------------------------------------------------------------------- /testdata/alias/Taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | qux: 5 | aliases: [q, x] 6 | cmds: 7 | - echo "qux" 8 | -------------------------------------------------------------------------------- /testdata/alias/testdata/TestAlias-alias.golden: -------------------------------------------------------------------------------- 1 | task: [foo] echo "foo" 2 | foo 3 | task: [bar] echo "bar" 4 | bar 5 | task: [included:qux] echo "qux" 6 | qux 7 | -------------------------------------------------------------------------------- /testdata/alias/testdata/TestAlias-alias_summary.golden: -------------------------------------------------------------------------------- 1 | task: foo 2 | 3 | (task does not have description or summary) 4 | 5 | aliases: 6 | - f 7 | - x 8 | 9 | commands: 10 | - echo "foo" 11 | - Task: b 12 | -------------------------------------------------------------------------------- /testdata/alias/testdata/TestAlias-duplicate_alias-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Found multiple tasks (foo, bar) that match "x" -------------------------------------------------------------------------------- /testdata/alias/testdata/TestAlias-duplicate_alias.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/alias/testdata/TestAlias-duplicate_alias.golden -------------------------------------------------------------------------------- /testdata/checksum/.gitignore: -------------------------------------------------------------------------------- 1 | .task/ 2 | generated.txt 3 | -------------------------------------------------------------------------------- /testdata/checksum/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | build: 5 | cmds: 6 | - cp ./source.txt ./generated.txt 7 | sources: 8 | - ./**/glob-with-inexistent-file.txt 9 | - ./*.txt 10 | - exclude: ./ignore_me.txt 11 | - exclude: ./generated.txt 12 | generates: 13 | - ./generated.txt 14 | method: checksum 15 | 16 | build-with-status: 17 | cmds: 18 | - cp ./source.txt ./generated.txt 19 | sources: 20 | - ./source.txt 21 | status: 22 | - test -f ./generated.txt 23 | -------------------------------------------------------------------------------- /testdata/checksum/ignore_me.txt: -------------------------------------------------------------------------------- 1 | plz ignore me 2 | -------------------------------------------------------------------------------- /testdata/checksum/source.txt: -------------------------------------------------------------------------------- 1 | Hello, World! 2 | -------------------------------------------------------------------------------- /testdata/cmds_vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | build-checksum: 5 | sources: 6 | - ./source.txt 7 | cmds: 8 | - echo "{{.CHECKSUM}}" 9 | 10 | build-ts: 11 | method: timestamp 12 | sources: 13 | - ./source.txt 14 | cmds: 15 | - echo '{{.TIMESTAMP.Unix}}' 16 | - echo '{{.TIMESTAMP}}' 17 | -------------------------------------------------------------------------------- /testdata/cmds_vars/source.txt: -------------------------------------------------------------------------------- 1 | Hello, World! 2 | -------------------------------------------------------------------------------- /testdata/concurrency/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | tasks: 4 | default: 5 | deps: 6 | - t1 7 | 8 | t1: 9 | deps: 10 | - t3 11 | - t4 12 | cmds: 13 | - task: t2 14 | - echo done 1 15 | t2: 16 | deps: 17 | - t5 18 | - t6 19 | cmds: 20 | - echo done 2 21 | t3: 22 | cmds: 23 | - echo done 3 24 | t4: 25 | cmds: 26 | - echo done 4 27 | t5: 28 | cmds: 29 | - echo done 5 30 | t6: 31 | cmds: 32 | - echo done 6 33 | -------------------------------------------------------------------------------- /testdata/concurrency/testdata/TestConcurrency.golden: -------------------------------------------------------------------------------- 1 | done 1 2 | done 2 3 | done 3 4 | done 4 5 | done 5 6 | done 6 7 | task: [t1] echo done 1 8 | task: [t2] echo done 2 9 | task: [t3] echo done 3 10 | task: [t4] echo done 4 11 | task: [t5] echo done 5 12 | task: [t6] echo done 6 13 | -------------------------------------------------------------------------------- /testdata/cyclic/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | task-1: 5 | deps: 6 | - task: task-2 7 | 8 | task-2: 9 | deps: 10 | - task: task-1 11 | -------------------------------------------------------------------------------- /testdata/deferred/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | task-1: 5 | - echo 'task-1 ran {{.PARAM}}' 6 | 7 | task-2: 8 | - defer: { task: 'task-1', vars: { PARAM: 'successfully' } } 9 | - defer: { task: 'task-1', vars: { PARAM: 'successfully' }, silent: true } 10 | - defer: echo 'echo ran' 11 | silent: true 12 | - defer: echo 'failing' && exit 2 13 | - echo 'cmd ran' 14 | - exit 1 15 | 16 | parent: 17 | vars: 18 | VAR1: "value-from-parent" 19 | cmds: 20 | - defer: 21 | task: child 22 | vars: 23 | VAR1: 'task deferred {{.VAR1}}' 24 | - task: child 25 | vars: 26 | VAR1: 'task immediate {{.VAR1}}' 27 | child: 28 | cmds: 29 | - cmd: echo "child {{.VAR1}}" 30 | -------------------------------------------------------------------------------- /testdata/deps/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | deps: [d1, d2, d3] 6 | 7 | d1: 8 | deps: [d11, d12, d13] 9 | cmds: 10 | - echo 'd1' 11 | 12 | d2: 13 | deps: [d21, d22, d23] 14 | cmds: 15 | - echo 'd2' 16 | 17 | d3: 18 | deps: [d31, d32, d33] 19 | cmds: 20 | - echo 'd3' 21 | 22 | d11: 23 | cmds: 24 | - echo 'd11' 25 | 26 | d12: 27 | cmds: 28 | - echo 'd12' 29 | 30 | d13: 31 | cmds: 32 | - echo 'd13' 33 | 34 | d21: 35 | cmds: 36 | - echo 'd21' 37 | 38 | d22: 39 | cmds: 40 | - echo 'd22' 41 | 42 | d23: 43 | cmds: 44 | - echo 'd23' 45 | 46 | d31: 47 | cmds: 48 | - echo 'd31' 49 | 50 | d32: 51 | cmds: 52 | - echo 'd32' 53 | 54 | d33: 55 | cmds: 56 | - echo 'd33' 57 | -------------------------------------------------------------------------------- /testdata/deps/d1.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d11.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d12.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d13.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d2.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d21.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d22.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d23.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d3.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d31.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d32.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/d33.txt: -------------------------------------------------------------------------------- 1 | Text 2 | -------------------------------------------------------------------------------- /testdata/deps/testdata/TestDeps.golden: -------------------------------------------------------------------------------- 1 | d1 2 | d11 3 | d12 4 | d13 5 | d2 6 | d21 7 | d22 8 | d23 9 | d3 10 | d31 11 | d32 12 | d33 13 | -------------------------------------------------------------------------------- /testdata/desc/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: 3 2 | tasks: 3 | build: 4 | aliases: 5 | - b 6 | desc: | 7 | Multi-line escription with alias which is super long long long long long long 8 | another line 9 | third line long long long long long long long long 10 | test: 11 | aliases: 12 | - t 13 | desc: Single line description with alias 14 | -------------------------------------------------------------------------------- /testdata/dir/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | whereami: 5 | cmds: 6 | - pwd 7 | silent: true 8 | -------------------------------------------------------------------------------- /testdata/dir/dynamic_var/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/dir/dynamic_var/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | sub: 5 | taskfile: subdirectory 6 | dir: subdirectory 7 | 8 | vars: 9 | DIRECTORY: subdirectory 10 | 11 | tasks: 12 | default: 13 | - task: from-root-taskfile 14 | - task: sub:from-included-taskfile 15 | - task: sub:from-included-taskfile-task 16 | - task: from-interpolated-dir 17 | 18 | from-root-taskfile: 19 | cmds: 20 | - echo '{{.TASK_DIR}}' > from_root_taskfile.txt 21 | dir: subdirectory 22 | vars: 23 | TASK_DIR: 24 | sh: basename $(pwd) 25 | silent: true 26 | 27 | from-interpolated-dir: 28 | cmds: 29 | - echo '{{.INTERPOLATED_DIR}}' > from_interpolated_dir.txt 30 | dir: '{{.DIRECTORY}}' 31 | vars: 32 | INTERPOLATED_DIR: 33 | sh: basename $(pwd) 34 | -------------------------------------------------------------------------------- /testdata/dir/dynamic_var/subdirectory/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | vars: 4 | TASKFILE_DIR: 5 | sh: basename $(pwd) 6 | 7 | tasks: 8 | from-included-taskfile: 9 | cmds: 10 | - echo '{{.TASKFILE_DIR}}' > from_included_taskfile.txt 11 | silent: true 12 | 13 | from-included-taskfile-task: 14 | cmds: 15 | - echo '{{.TASKFILE_TASK_DIR}}' > from_included_taskfile_task.txt 16 | silent: true 17 | vars: 18 | TASKFILE_TASK_DIR: 19 | sh: basename $(pwd) 20 | -------------------------------------------------------------------------------- /testdata/dir/dynamic_var_on_created_dir/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | dir: created 6 | cmds: 7 | - echo {{.TASK_DIR}} 8 | vars: 9 | TASK_DIR: 10 | sh: echo $(pwd) 11 | -------------------------------------------------------------------------------- /testdata/dir/explicit_doesnt_exist/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | whereami: 5 | dir: createme 6 | cmds: 7 | - pwd 8 | silent: true 9 | -------------------------------------------------------------------------------- /testdata/dir/explicit_exists/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | whereami: 5 | dir: exists 6 | cmds: 7 | - pwd 8 | silent: true 9 | -------------------------------------------------------------------------------- /testdata/dir/explicit_exists/exists/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/dir/explicit_exists/exists/.keep -------------------------------------------------------------------------------- /testdata/dotenv/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/dotenv/default/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | dotenv: ['../include1/.env', '../include1/envs/.env'] 4 | 5 | tasks: 6 | default: 7 | cmds: 8 | - echo "INCLUDE1='$INCLUDE1' INCLUDE2='$INCLUDE2'" > include.txt 9 | -------------------------------------------------------------------------------- /testdata/dotenv/env_var_in_path/.env.testing: -------------------------------------------------------------------------------- 1 | VAR_IN_DOTENV=var_in_dot_env_2 2 | -------------------------------------------------------------------------------- /testdata/dotenv/env_var_in_path/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | dotenv: [".env.{{.ENV_VAR}}"] 4 | 5 | tasks: 6 | default: 7 | cmds: 8 | - echo "VAR='$VAR_IN_DOTENV'" > var.txt 9 | -------------------------------------------------------------------------------- /testdata/dotenv/error_included_envs/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | include1: '../include1' 5 | 6 | tasks: 7 | default: 8 | cmds: 9 | - echo "INCLUDE1='$INCLUDE1' INCLUDE2='$INCLUDE2'" > include-errors2.txt 10 | -------------------------------------------------------------------------------- /testdata/dotenv/include1/.env: -------------------------------------------------------------------------------- 1 | INCLUDE1=from_include1 2 | -------------------------------------------------------------------------------- /testdata/dotenv/include1/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | dotenv: ['.env'] 4 | -------------------------------------------------------------------------------- /testdata/dotenv/include1/envs/.env: -------------------------------------------------------------------------------- 1 | INCLUDE2=from_include2 2 | -------------------------------------------------------------------------------- /testdata/dotenv/local_env_in_path/.env.testing: -------------------------------------------------------------------------------- 1 | VAR_IN_DOTENV=var_in_dot_env_1 2 | -------------------------------------------------------------------------------- /testdata/dotenv/local_env_in_path/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | env: 4 | LOCAL_ENV: testing 5 | 6 | dotenv: [".env.{{.LOCAL_ENV}}"] 7 | 8 | tasks: 9 | default: 10 | cmds: 11 | - echo "VAR='$VAR_IN_DOTENV'" > var.txt 12 | -------------------------------------------------------------------------------- /testdata/dotenv/local_var_in_path/.env.testing: -------------------------------------------------------------------------------- 1 | VAR_IN_DOTENV=var_in_dot_env_3 2 | -------------------------------------------------------------------------------- /testdata/dotenv/local_var_in_path/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | PART_1: test 5 | PART_2: ing 6 | LOCAL_VAR: "{{.PART_1}}{{.PART_2}}" 7 | 8 | dotenv: [".env.{{.LOCAL_VAR}}"] 9 | 10 | tasks: 11 | default: 12 | cmds: 13 | - echo "VAR='$VAR_IN_DOTENV'" > var.txt 14 | -------------------------------------------------------------------------------- /testdata/dotenv/missing_env/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | dotenv: ['.env'] 4 | 5 | tasks: 6 | default: 7 | cmds: 8 | - echo "INCLUDE1='$INCLUDE1' INCLUDE2='$INCLUDE2'" > include.txt 9 | -------------------------------------------------------------------------------- /testdata/dotenv/parse_error/.env-with-error: -------------------------------------------------------------------------------- 1 | #intentional parse error 2 | SOME_VAR 3 | -------------------------------------------------------------------------------- /testdata/dotenv/parse_error/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | dotenv: ['.env-with-error'] 4 | 5 | tasks: 6 | default: 7 | cmd: "true" 8 | 9 | -------------------------------------------------------------------------------- /testdata/dotenv_task/default/.env: -------------------------------------------------------------------------------- 1 | FOO=foo 2 | -------------------------------------------------------------------------------- /testdata/dotenv_task/default/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/dotenv_task/default/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | env: 4 | FOO: global 5 | 6 | tasks: 7 | dotenv: 8 | dotenv: ['.env'] 9 | cmds: 10 | - echo "$FOO" > dotenv.txt 11 | 12 | dotenv-overridden-by-env: 13 | dotenv: ['.env'] 14 | env: 15 | FOO: overridden 16 | cmds: 17 | - echo "$FOO" > dotenv-overridden-by-env.txt 18 | 19 | dotenv-with-var-name: 20 | vars: 21 | DOTENV: .env 22 | dotenv: ['{{.DOTENV}}'] 23 | cmds: 24 | - echo "$FOO" > dotenv-with-var-name.txt 25 | 26 | no-dotenv: 27 | cmds: 28 | - echo "$FOO" > no-dotenv.txt 29 | -------------------------------------------------------------------------------- /testdata/dry/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | build: 5 | cmds: 6 | - touch file.txt 7 | -------------------------------------------------------------------------------- /testdata/dry_checksum/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - echo "Working..." 7 | sources: 8 | - source.txt 9 | method: checksum 10 | -------------------------------------------------------------------------------- /testdata/dry_checksum/source.txt: -------------------------------------------------------------------------------- 1 | Something... 2 | -------------------------------------------------------------------------------- /testdata/empty_task/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | -------------------------------------------------------------------------------- /testdata/empty_task/testdata/TestEmptyTask.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/empty_task/testdata/TestEmptyTask.golden -------------------------------------------------------------------------------- /testdata/empty_taskfile/Taskfile.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/empty_taskfile/Taskfile.yml -------------------------------------------------------------------------------- /testdata/empty_taskfile/testdata/TestEmptyTaskfile-err-setup.golden: -------------------------------------------------------------------------------- 1 | task: Missing schema version in Taskfile "/testdata/empty_taskfile/Taskfile.yml" -------------------------------------------------------------------------------- /testdata/empty_taskfile/testdata/TestEmptyTaskfile.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/empty_taskfile/testdata/TestEmptyTaskfile.golden -------------------------------------------------------------------------------- /testdata/env/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | vars: 4 | BAZ: 5 | sh: echo baz 6 | 7 | env: 8 | FOO: foo 9 | BAR: bar 10 | BAZ: "{{.BAZ}}" 11 | QUX: from_taskfile 12 | 13 | tasks: 14 | default: 15 | cmds: 16 | - task: local 17 | - task: global 18 | - task: not-overridden 19 | - task: multiple_type 20 | - task: dynamic 21 | 22 | local: 23 | vars: 24 | AMD64: amd64 25 | env: 26 | GOOS: linux 27 | GOARCH: "{{.AMD64}}" 28 | CGO_ENABLED: 29 | sh: echo '0' 30 | cmds: 31 | - echo "GOOS='$GOOS' GOARCH='$GOARCH' CGO_ENABLED='$CGO_ENABLED'" 32 | 33 | global: 34 | env: 35 | BAR: overridden 36 | cmds: 37 | - echo "FOO='$FOO' BAR='$BAR' BAZ='$BAZ'" 38 | 39 | multiple_type: 40 | env: 41 | FOO: 1 42 | BAR: true 43 | BAZ: 1.1 44 | cmds: 45 | - echo "FOO='$FOO' BAR='$BAR' BAZ='$BAZ'" 46 | 47 | not-overridden: 48 | cmds: 49 | - echo "QUX='$QUX'" 50 | 51 | overridden: 52 | cmds: 53 | - echo "QUX='$QUX'" 54 | 55 | dynamic: 56 | silent: true 57 | vars: 58 | DYNAMIC_FOO: 59 | sh: echo $FOO 60 | cmds: 61 | - echo "{{ .DYNAMIC_FOO }}" 62 | -------------------------------------------------------------------------------- /testdata/env/dynamic.txt: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /testdata/env/global.txt: -------------------------------------------------------------------------------- 1 | FOO='foo' BAR='overridden' BAZ='baz' 2 | -------------------------------------------------------------------------------- /testdata/env/local.txt: -------------------------------------------------------------------------------- 1 | GOOS='linux' GOARCH='amd64' CGO_ENABLED='0' 2 | -------------------------------------------------------------------------------- /testdata/env/multiple_type.txt: -------------------------------------------------------------------------------- 1 | FOO='1' BAR='true' BAZ='1.1' 2 | -------------------------------------------------------------------------------- /testdata/env/not-overridden.txt: -------------------------------------------------------------------------------- 1 | QUX='from_os' 2 | -------------------------------------------------------------------------------- /testdata/env/overridden.txt: -------------------------------------------------------------------------------- 1 | QUX='from_taskfile' 2 | -------------------------------------------------------------------------------- /testdata/env/testdata/TestEnv-env_precedence_disabled.golden: -------------------------------------------------------------------------------- 1 | GOOS='linux' GOARCH='amd64' CGO_ENABLED='0' 2 | FOO='foo' BAR='overridden' BAZ='baz' 3 | QUX='from_os' 4 | FOO='1' BAR='true' BAZ='1.1' 5 | foo 6 | -------------------------------------------------------------------------------- /testdata/env/testdata/TestEnv-env_precedence_enabled.golden: -------------------------------------------------------------------------------- 1 | GOOS='linux' GOARCH='amd64' CGO_ENABLED='0' 2 | FOO='foo' BAR='overridden' BAZ='baz' 3 | QUX='from_taskfile' 4 | FOO='1' BAR='true' BAZ='1.1' 5 | foo 6 | -------------------------------------------------------------------------------- /testdata/error_code/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | direct: 5 | cmds: 6 | - exit 42 7 | 8 | indirect: 9 | cmds: 10 | - task: direct 11 | -------------------------------------------------------------------------------- /testdata/evaluate_symlinks_in_paths/Taskfile.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | sources: 6 | - src/**/* 7 | cmds: 8 | - echo "some job" 9 | 10 | test-sym: 11 | cmds: 12 | - echo "shared file source changed" > src/shared/b 13 | 14 | reset: 15 | cmds: 16 | - echo "shared file source" > src/shared/b 17 | - echo "file source" > src/a 18 | -------------------------------------------------------------------------------- /testdata/evaluate_symlinks_in_paths/shared/b: -------------------------------------------------------------------------------- 1 | shared file source 2 | -------------------------------------------------------------------------------- /testdata/evaluate_symlinks_in_paths/shared/inner_shared/c: -------------------------------------------------------------------------------- 1 | inner shared file source 2 | -------------------------------------------------------------------------------- /testdata/evaluate_symlinks_in_paths/src/a: -------------------------------------------------------------------------------- 1 | file source 2 | -------------------------------------------------------------------------------- /testdata/evaluate_symlinks_in_paths/src/shared: -------------------------------------------------------------------------------- 1 | ../shared -------------------------------------------------------------------------------- /testdata/exit_code/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | 5 | vars: 6 | PREFIX: EXIT_CODE= 7 | 8 | tasks: 9 | exit-zero: 10 | vars: 11 | FOO: bar 12 | DYNAMIC_FOO: 13 | sh: echo 'bar' 14 | cmds: 15 | - defer: echo FOO={{.FOO}} - DYNAMIC_FOO={{.DYNAMIC_FOO}} - {{.PREFIX}}{{.EXIT_CODE}} 16 | - exit 0 17 | 18 | exit-one: 19 | vars: 20 | FOO: bar 21 | DYNAMIC_FOO: 22 | sh: echo 'bar' 23 | cmds: 24 | - defer: echo FOO={{.FOO}} - DYNAMIC_FOO={{.DYNAMIC_FOO}} - {{.PREFIX}}{{.EXIT_CODE}} 25 | - exit 1 26 | -------------------------------------------------------------------------------- /testdata/exit_immediately/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: | 5 | this_should_fail 6 | echo "This shouldn't be print" 7 | -------------------------------------------------------------------------------- /testdata/expand/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | pwd: 5 | cmds: 6 | - pwd 7 | dir: '~' 8 | silent: true 9 | -------------------------------------------------------------------------------- /testdata/file_names/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/file_names/Taskfile.dist.yaml/Taskfile.dist.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: echo "hello" > output.txt 5 | -------------------------------------------------------------------------------- /testdata/file_names/Taskfile.dist.yml/Taskfile.dist.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: echo "hello" > output.txt 5 | -------------------------------------------------------------------------------- /testdata/file_names/Taskfile.yaml/Taskfile.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: echo "hello" > output.txt 5 | -------------------------------------------------------------------------------- /testdata/file_names/Taskfile.yml/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: echo "hello" > output.txt 5 | -------------------------------------------------------------------------------- /testdata/for/cmds/bar.txt: -------------------------------------------------------------------------------- 1 | bar 2 | -------------------------------------------------------------------------------- /testdata/for/cmds/foo.txt: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-different-tasks.golden: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-explicit.golden: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | c 4 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-generates-glob.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-generates.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref-error-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Failed to parse /testdata/for/cmds/Taskfile.yml: 2 | matrix reference ".NOT_A_LIST" must resolve to a list -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref-error.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref-error.golden -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref.golden: -------------------------------------------------------------------------------- 1 | windows/amd64 2 | windows/arm64 3 | linux/amd64 4 | linux/arm64 5 | darwin/amd64 6 | darwin/arm64 7 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-matrix.golden: -------------------------------------------------------------------------------- 1 | windows/amd64 2 | windows/arm64 3 | linux/amd64 4 | linux/arm64 5 | darwin/amd64 6 | darwin/arm64 7 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-sources-glob.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-sources.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-task-as.golden: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-task.golden: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-vars-sh.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/cmds/testdata/TestForCmds-loop-vars.golden: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | -------------------------------------------------------------------------------- /testdata/for/deps/bar.txt: -------------------------------------------------------------------------------- 1 | bar 2 | -------------------------------------------------------------------------------- /testdata/for/deps/foo.txt: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-different-tasks.golden: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-explicit.golden: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | c 4 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-generates-glob.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-generates.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-matrix-ref-error-err-run.golden: -------------------------------------------------------------------------------- 1 | matrix reference ".NOT_A_LIST" must resolve to a list 2 | task: Failed to parse /testdata/for/deps/Taskfile.yml: 3 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-matrix-ref-error.golden: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-matrix-ref.golden: -------------------------------------------------------------------------------- 1 | darwin/amd64 2 | darwin/arm64 3 | linux/amd64 4 | linux/arm64 5 | windows/amd64 6 | windows/arm64 7 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-matrix.golden: -------------------------------------------------------------------------------- 1 | darwin/amd64 2 | darwin/arm64 3 | linux/amd64 4 | linux/arm64 5 | windows/amd64 6 | windows/arm64 7 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-sources-glob.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-sources.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-task-as.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-task.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-vars-sh.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/for/deps/testdata/TestForDeps-loop-vars.golden: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/force/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | tasks: 4 | task-with-dep: 5 | status: [ test true ] 6 | deps: [ indirect ] 7 | cmds: 8 | - echo "direct" 9 | 10 | task-with-subtask: 11 | status: [ test true ] 12 | cmds: 13 | - task: indirect 14 | - echo "direct" 15 | 16 | indirect: 17 | status: [ test true ] 18 | cmds: 19 | - echo "indirect" 20 | -------------------------------------------------------------------------------- /testdata/fuzzy/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: 3 2 | 3 | tasks: 4 | install: echo 'install' 5 | -------------------------------------------------------------------------------- /testdata/fuzzy/testdata/TestFuzzyModel-fuzzy-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "instal" does not exist. Did you mean "install"? -------------------------------------------------------------------------------- /testdata/fuzzy/testdata/TestFuzzyModel-fuzzy.golden: -------------------------------------------------------------------------------- 1 | task: No tasks with description available. Try --list-all to list all tasks 2 | -------------------------------------------------------------------------------- /testdata/fuzzy/testdata/TestFuzzyModel-not-fuzzy.golden: -------------------------------------------------------------------------------- 1 | task: [install] echo 'install' 2 | install 3 | -------------------------------------------------------------------------------- /testdata/generates/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/generates/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | vars: 4 | BUILD_DIR: 5 | sh: pwd 6 | 7 | tasks: 8 | abs.txt: 9 | desc: generates dest file based on absolute paths 10 | deps: 11 | - sub/src.txt 12 | dir: sub 13 | cmds: 14 | - cat src.txt > '{{.BUILD_DIR}}/abs.txt' 15 | method: timestamp 16 | sources: 17 | - src.txt 18 | generates: 19 | - "{{.BUILD_DIR}}/abs.txt" 20 | 21 | rel.txt: 22 | desc: generates dest file based on relative paths 23 | deps: 24 | - sub/src.txt 25 | dir: sub 26 | cmds: 27 | - cat src.txt > '../rel.txt' 28 | method: timestamp 29 | sources: 30 | - src.txt 31 | generates: 32 | - "../rel.txt" 33 | 34 | sub/src.txt: 35 | desc: generate source file 36 | cmds: 37 | - mkdir -p sub 38 | - echo "hello world" > sub/src.txt 39 | method: timestamp 40 | status: 41 | - test -f sub/src.txt 42 | 43 | 'my text file.txt': 44 | desc: generate file with spaces in the name 45 | deps: [sub/src.txt] 46 | cmds: 47 | - cat sub/src.txt > 'my text file.txt' 48 | method: timestamp 49 | sources: 50 | - sub/src.txt 51 | generates: 52 | - 'my text file.txt' 53 | -------------------------------------------------------------------------------- /testdata/generates/sub/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/generates/sub/.keep -------------------------------------------------------------------------------- /testdata/ignore_errors/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | task-should-pass: 5 | cmds: 6 | - exit 1 7 | ignore_error: true 8 | 9 | task-should-fail: 10 | cmds: 11 | - exit 1 12 | 13 | cmd-should-pass: 14 | cmds: 15 | - cmd: exit 1 16 | ignore_error: true 17 | 18 | cmd-should-fail: 19 | cmds: 20 | - cmd: exit 1 21 | -------------------------------------------------------------------------------- /testdata/ignore_nil_elements/cmds/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - echo "string-slice-1" 7 | - 8 | -------------------------------------------------------------------------------- /testdata/ignore_nil_elements/deps/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | deps: 6 | - 7 | - task: dep 8 | 9 | dep: 10 | cmds: 11 | - echo "string-slice-1" 12 | -------------------------------------------------------------------------------- /testdata/ignore_nil_elements/includes/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | inc: inc.yml 5 | 6 | tasks: 7 | default: 8 | cmds: 9 | - task: inc:default 10 | -------------------------------------------------------------------------------- /testdata/ignore_nil_elements/includes/inc.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - 7 | - echo "string-slice-1" 8 | -------------------------------------------------------------------------------- /testdata/ignore_nil_elements/preconditions/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | preconditions: 6 | - 7 | - sh: "[ 1 = 1 ]" 8 | cmds: 9 | - echo "string-slice-1" 10 | -------------------------------------------------------------------------------- /testdata/ignore_signals/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - '{{.CLI_ARGS}}' 7 | -------------------------------------------------------------------------------- /testdata/include_with_vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | includes: 4 | included1: 5 | taskfile: include/Taskfile.include1.yml 6 | vars: 7 | VAR_1: included1-var1 8 | included2: 9 | taskfile: include/Taskfile.include2.yml 10 | vars: 11 | VAR_1: included2-var1 12 | included3: 13 | taskfile: include/Taskfile.include3.yml 14 | 15 | tasks: 16 | task1: 17 | cmds: 18 | - task: included1:task1 19 | - task: included2:task1 20 | - task: included3:task1 21 | -------------------------------------------------------------------------------- /testdata/include_with_vars/include/Taskfile.include1.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | VAR_1: '{{.VAR_1 | default "included-default-var1"}}' 5 | VAR_2: '{{.VAR_2 | default "included-default-var2"}}' 6 | 7 | tasks: 8 | task1: 9 | cmds: 10 | - echo "VAR_1 is {{.VAR_1}}" 11 | - echo "VAR_2 is {{.VAR_2}}" 12 | -------------------------------------------------------------------------------- /testdata/include_with_vars/include/Taskfile.include2.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | VAR_1: '{{.VAR_1 | default "included-default-var1"}}' 5 | VAR_2: '{{.VAR_2 | default "included-default-var2"}}' 6 | 7 | tasks: 8 | task1: 9 | cmds: 10 | - echo "VAR_1 is {{.VAR_1}}" 11 | - echo "VAR_2 is {{.VAR_2}}" 12 | -------------------------------------------------------------------------------- /testdata/include_with_vars/include/Taskfile.include3.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | VAR_1: '{{.VAR_1 | default "included-default-var1"}}' 5 | VAR_2: '{{.VAR_2 | default "included-default-var2"}}' 6 | 7 | tasks: 8 | task1: 9 | cmds: 10 | - echo "VAR_1 is {{.VAR_1}}" 11 | - echo "VAR_2 is {{.VAR_2}}" 12 | -------------------------------------------------------------------------------- /testdata/include_with_vars_inside_include/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | INCLUDE: include 5 | FOO: 6 | sh : echo bar 7 | 8 | includes: 9 | included1: 10 | taskfile: '{{.INCLUDE}}/Taskfile.include.yml' 11 | -------------------------------------------------------------------------------- /testdata/include_with_vars_inside_include/include/Taskfile.include.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | -------------------------------------------------------------------------------- /testdata/include_with_vars_multi_level/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | includes: 4 | lib: 5 | taskfile: lib/Taskfile.yml 6 | internal: true 7 | foo: 8 | taskfile: foo/Taskfile.yml 9 | bar: 10 | taskfile: bar/Taskfile.yml 11 | 12 | tasks: 13 | default: 14 | cmds: 15 | - task: lib:greet 16 | - task: foo:lib:greet 17 | - task: bar:lib:greet 18 | -------------------------------------------------------------------------------- /testdata/include_with_vars_multi_level/bar/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | includes: 4 | lib: 5 | taskfile: ../lib/Taskfile.yml 6 | vars: 7 | RECEIVER: "bar" 8 | -------------------------------------------------------------------------------- /testdata/include_with_vars_multi_level/foo/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | includes: 4 | lib: 5 | taskfile: ../lib/Taskfile.yml 6 | vars: 7 | RECEIVER: "foo" 8 | -------------------------------------------------------------------------------- /testdata/include_with_vars_multi_level/lib/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | RECEIVER: '{{ .RECEIVER | default "world" }}' 5 | 6 | tasks: 7 | greet: 8 | cmds: 9 | - echo 'Hello {{.RECEIVER}}' 10 | -------------------------------------------------------------------------------- /testdata/included_taskfile_var_merging/Taskfile.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | includes: 4 | foo: 5 | taskfile: ./foo/Taskfile.yaml 6 | bar: 7 | taskfile: ./bar/Taskfile.yaml 8 | 9 | tasks: 10 | stub: 11 | cmds: 12 | - echo 0 13 | -------------------------------------------------------------------------------- /testdata/included_taskfile_var_merging/bar/Taskfile.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | DIR: bar 5 | 6 | tasks: 7 | pwd: 8 | dir: ./{{ .DIR }} 9 | cmds: 10 | - echo "{{ .DIR }}" 11 | - pwd 12 | -------------------------------------------------------------------------------- /testdata/included_taskfile_var_merging/foo/Taskfile.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | DIR: foo 5 | 6 | tasks: 7 | pwd: 8 | dir: ./{{ .DIR }} 9 | cmds: 10 | - echo "{{ .DIR }}" 11 | - pwd 12 | -------------------------------------------------------------------------------- /testdata/includes/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/includes/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: ./included 5 | included_taskfile: ./Taskfile2.yml 6 | included_without_dir: 7 | taskfile: ./module1 8 | included_taskfile_without_dir: 9 | taskfile: ./module1/Taskfile.yml 10 | included_with_dir: 11 | taskfile: ./module2 12 | dir: ./module2 13 | included_taskfile_with_dir: 14 | taskfile: ./module2/Taskfile.yml 15 | dir: ./module2 16 | included_os: ./Taskfile_{{OS}}.yml 17 | 18 | tasks: 19 | default: 20 | cmds: 21 | - task: gen 22 | - task: included:gen 23 | - task: included_taskfile:gen 24 | - task: included_without_dir:gen_file 25 | - task: included_taskfile_without_dir:gen_dir 26 | - task: included_with_dir:gen_file 27 | - task: included_taskfile_with_dir:gen_dir 28 | - task: included_os:gen 29 | 30 | gen: 31 | cmds: 32 | - echo main > main.txt 33 | -------------------------------------------------------------------------------- /testdata/includes/Taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen: 5 | cmds: 6 | - echo included_taskfile > included_taskfile.txt 7 | -------------------------------------------------------------------------------- /testdata/includes/Taskfile_darwin.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen: echo 'os' > os_include.txt 5 | -------------------------------------------------------------------------------- /testdata/includes/Taskfile_linux.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen: echo 'os' > os_include.txt 5 | -------------------------------------------------------------------------------- /testdata/includes/Taskfile_windows.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen: echo 'os' > os_include.txt 5 | -------------------------------------------------------------------------------- /testdata/includes/included/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen: 5 | cmds: 6 | - echo included_directory > included_directory.txt 7 | -------------------------------------------------------------------------------- /testdata/includes/module1/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen_dir: 5 | cmds: 6 | - echo included_directory_without_dir > included_directory_without_dir.txt 7 | 8 | gen_file: 9 | cmds: 10 | - echo included_taskfile_without_dir > included_taskfile_without_dir.txt 11 | -------------------------------------------------------------------------------- /testdata/includes/module2/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen_dir: 5 | cmds: 6 | - echo included_directory_with_dir > included_directory_with_dir.txt 7 | 8 | gen_file: 9 | cmds: 10 | - echo included_taskfile_with_dir > included_taskfile_with_dir.txt 11 | -------------------------------------------------------------------------------- /testdata/includes_call_root_task/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/includes_call_root_task/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: Taskfile2.yml 5 | 6 | tasks: 7 | root-task: 8 | cmds: 9 | - echo "root task" > root_task.txt 10 | -------------------------------------------------------------------------------- /testdata/includes_call_root_task/Taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | call-root: 5 | cmds: 6 | - task: :root-task 7 | -------------------------------------------------------------------------------- /testdata/includes_checksum/correct/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: ../included.yml 6 | internal: true 7 | checksum: c97f39eb96fe3fa5fe2a610d244b8449897b06f0c93821484af02e0999781bf5 8 | 9 | tasks: 10 | default: 11 | cmds: 12 | - task: included:default 13 | -------------------------------------------------------------------------------- /testdata/includes_checksum/correct/testdata/TestIncludeChecksum-correct.golden: -------------------------------------------------------------------------------- 1 | task: [included:default] echo "Hello, World!" 2 | Hello, World! 3 | -------------------------------------------------------------------------------- /testdata/includes_checksum/correct_remote/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: https://taskfile.dev 6 | internal: true 7 | checksum: c153e97e0b3a998a7ed2e61064c6ddaddd0de0c525feefd6bba8569827d8efe9 8 | 9 | tasks: 10 | default: 11 | cmds: 12 | - task: included:default 13 | -------------------------------------------------------------------------------- /testdata/includes_checksum/included.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - echo "Hello, World!" 7 | -------------------------------------------------------------------------------- /testdata/includes_checksum/incorrect/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: ../included.yml 6 | internal: true 7 | checksum: foo 8 | 9 | tasks: 10 | default: 11 | cmds: 12 | - task: included:default 13 | -------------------------------------------------------------------------------- /testdata/includes_checksum/incorrect/testdata/TestIncludeChecksum-incorrect-err-setup.golden: -------------------------------------------------------------------------------- 1 | task: The checksum of the Taskfile at "/testdata/includes_checksum/included.yml" does not match! 2 | got: "c97f39eb96fe3fa5fe2a610d244b8449897b06f0c93821484af02e0999781bf5" 3 | want: "foo" -------------------------------------------------------------------------------- /testdata/includes_checksum/incorrect/testdata/TestIncludeChecksum-incorrect.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/includes_checksum/incorrect/testdata/TestIncludeChecksum-incorrect.golden -------------------------------------------------------------------------------- /testdata/includes_cycle/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | 'one': ./one/Taskfile.yml 5 | 6 | tasks: 7 | default: 8 | cmds: 9 | - echo "called_dep" > called_dep.txt 10 | level1: 11 | cmds: 12 | - echo "hello level 1" 13 | -------------------------------------------------------------------------------- /testdata/includes_cycle/one/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | 'two': ./two/Taskfile.yml 5 | 6 | tasks: 7 | level2: 8 | cmds: 9 | - echo "hello level 2" 10 | -------------------------------------------------------------------------------- /testdata/includes_cycle/one/two/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | bad: "../../Taskfile.yml" 5 | 6 | tasks: 7 | level3: 8 | cmds: 9 | - echo "hello level 3" 10 | -------------------------------------------------------------------------------- /testdata/includes_deps/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/includes_deps/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: Taskfile2.yml 5 | 6 | tasks: 7 | default: 8 | cmds: 9 | - task: included:default 10 | -------------------------------------------------------------------------------- /testdata/includes_deps/Taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | deps: [called_dep] 6 | cmds: 7 | - echo "default" > default.txt 8 | - task: called_task 9 | 10 | called_dep: 11 | cmds: 12 | - echo "called_dep" > called_dep.txt 13 | 14 | called_task: 15 | cmds: 16 | - echo "called_task" > called_task.txt 17 | -------------------------------------------------------------------------------- /testdata/includes_empty/.gitignore: -------------------------------------------------------------------------------- 1 | file.txt 2 | -------------------------------------------------------------------------------- /testdata/includes_empty/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: Taskfile2.yml 5 | -------------------------------------------------------------------------------- /testdata/includes_empty/Taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | vars: 4 | FILE: file.txt 5 | CONTENT: default 6 | 7 | tasks: 8 | default: 9 | cmds: 10 | - echo "{{.CONTENT}}" > {{.FILE}} 11 | -------------------------------------------------------------------------------- /testdata/includes_flatten/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/includes_flatten/Taskfile.multiple.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: ./included 6 | flatten: true 7 | 8 | tasks: 9 | gen: 10 | cmds: 11 | - echo "gen multiple" 12 | 13 | -------------------------------------------------------------------------------- /testdata/includes_flatten/Taskfile.with_default.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | tasks: 3 | default: echo "default from included flatten" 4 | -------------------------------------------------------------------------------- /testdata/includes_flatten/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: ./included 6 | dir: ./included 7 | flatten: true 8 | with_default: 9 | taskfile: ./Taskfile.with_default.yml 10 | flatten: true 11 | 12 | tasks: 13 | from_entrypoint: echo "from entrypoint" 14 | 15 | 16 | -------------------------------------------------------------------------------- /testdata/includes_flatten/included/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | nested: 5 | taskfile: ../nested 6 | flatten: true 7 | 8 | tasks: 9 | gen: 10 | cmds: 11 | - echo "gen from included" 12 | 13 | with_deps: 14 | deps: 15 | - gen 16 | cmds: 17 | - echo "with_deps from included" 18 | 19 | 20 | pwd: 21 | desc: Print working directory 22 | cmds: 23 | - pwd 24 | -------------------------------------------------------------------------------- /testdata/includes_flatten/nested/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | from_nested: 5 | cmds: 6 | - echo "from nested" 7 | -------------------------------------------------------------------------------- /testdata/includes_http/child-taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | third-with-dir-1: 5 | taskfile: "{{.INCLUDE_ROOT}}/child-taskfile3.yml" 6 | dir: ./dir-1 7 | third-with-dir-2: 8 | taskfile: "{{.INCLUDE_ROOT}}/child-taskfile3.yml" 9 | dir: ./dir-2 10 | -------------------------------------------------------------------------------- /testdata/includes_http/child-taskfile3.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: "true" 5 | -------------------------------------------------------------------------------- /testdata/includes_http/root-taskfile-remotefile-empty-dir-1st.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | second-no-dir: 5 | taskfile: "{{.INCLUDE_ROOT}}/child-taskfile2.yml" 6 | second-with-dir-1: 7 | taskfile: "{{.INCLUDE_ROOT}}/child-taskfile2.yml" 8 | dir: ./dir-1 9 | -------------------------------------------------------------------------------- /testdata/includes_http/root-taskfile-remotefile-empty-dir-2nd.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | second-with-dir-1: 5 | taskfile: "{{.INCLUDE_ROOT}}/child-taskfile2.yml" 6 | dir: ./dir-1 7 | second-no-dir: 8 | taskfile: "{{.INCLUDE_ROOT}}/child-taskfile2.yml" 9 | -------------------------------------------------------------------------------- /testdata/includes_incorrect/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: incomplete.yml 5 | -------------------------------------------------------------------------------- /testdata/includes_incorrect/incomplete.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | name: 4 | 'test 5 | -------------------------------------------------------------------------------- /testdata/includes_internal/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: Taskfile2.yml 6 | internal: true 7 | 8 | tasks: 9 | task-1: 10 | cmds: 11 | - task: included:default 12 | 13 | task-2: 14 | deps: 15 | - included:default 16 | -------------------------------------------------------------------------------- /testdata/includes_internal/Taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | task-3: 5 | cmds: 6 | - echo "Hello, World!" 7 | -------------------------------------------------------------------------------- /testdata/includes_interpolation/include/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | MODULE_NAME: included 5 | 6 | includes: 7 | include: '../{{.MODULE_NAME}}/Taskfile.yml' 8 | -------------------------------------------------------------------------------- /testdata/includes_interpolation/include_with_dir/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | MODULE_NAME: included 5 | 6 | includes: 7 | include-with-dir: 8 | taskfile: '../{{.MODULE_NAME}}/Taskfile.yml' 9 | dir: '../{{.MODULE_NAME}}' 10 | -------------------------------------------------------------------------------- /testdata/includes_interpolation/include_with_env_variable/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | includes: 4 | include-with-env-variable: '../{{.MODULE}}/Taskfile.yml' 5 | -------------------------------------------------------------------------------- /testdata/includes_interpolation/included/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - basename $(pwd) 7 | -------------------------------------------------------------------------------- /testdata/includes_multi_level/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | 'one': ./one/ 5 | 6 | tasks: 7 | default: 8 | cmds: 9 | - task: one:default 10 | - task: one:two:default 11 | - task: one:two:three:default 12 | -------------------------------------------------------------------------------- /testdata/includes_multi_level/called_one.txt: -------------------------------------------------------------------------------- 1 | one 2 | -------------------------------------------------------------------------------- /testdata/includes_multi_level/called_three.txt: -------------------------------------------------------------------------------- 1 | three 2 | -------------------------------------------------------------------------------- /testdata/includes_multi_level/called_two.txt: -------------------------------------------------------------------------------- 1 | two 2 | -------------------------------------------------------------------------------- /testdata/includes_multi_level/one/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | 'two': ./two/ 5 | 6 | tasks: 7 | default: echo one > called_one.txt 8 | -------------------------------------------------------------------------------- /testdata/includes_multi_level/one/two/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | 'three': ./three/Taskfile.yml 5 | 6 | tasks: 7 | default: echo two > called_two.txt 8 | -------------------------------------------------------------------------------- /testdata/includes_multi_level/one/two/three/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: echo three > called_three.txt 5 | -------------------------------------------------------------------------------- /testdata/includes_optional/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/includes_optional/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: TaskfileOptional.yml 6 | optional: true 7 | 8 | tasks: 9 | default: 10 | cmds: 11 | - echo "called_dep" > called_dep.txt 12 | -------------------------------------------------------------------------------- /testdata/includes_optional_explicit_false/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: TaskfileOptional.yml 6 | optional: false 7 | 8 | tasks: 9 | default: 10 | cmds: 11 | - echo "Hello, world!" 12 | -------------------------------------------------------------------------------- /testdata/includes_optional_implicit_false/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: TaskfileOptional.yml 5 | 6 | tasks: 7 | default: 8 | cmds: 9 | - echo "Hello, world!" 10 | -------------------------------------------------------------------------------- /testdata/includes_rel_path/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: ./included 6 | dir: ./included 7 | 8 | common: 9 | taskfile: ./common 10 | dir: ./common 11 | -------------------------------------------------------------------------------- /testdata/includes_rel_path/common/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | pwd: pwd 5 | -------------------------------------------------------------------------------- /testdata/includes_rel_path/included/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | common: 5 | taskfile: ../common 6 | dir: ../common 7 | -------------------------------------------------------------------------------- /testdata/includes_remote/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/includes_remote/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | first: "{{.FIRST_REMOTE_URL}}" 5 | -------------------------------------------------------------------------------- /testdata/includes_remote/first/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | second: "{{.SECOND_REMOTE_URL}}" 5 | 6 | tasks: 7 | write-file: 8 | requires: 9 | vars: [CONTENT, OUTPUT_FILE] 10 | cmd: | 11 | echo "{{.CONTENT}}" > "{{.OUTPUT_FILE}}" 12 | -------------------------------------------------------------------------------- /testdata/includes_remote/first/second/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | write-file: 5 | requires: 6 | vars: [CONTENT, OUTPUT_FILE] 7 | cmd: | 8 | echo "{{.CONTENT}}" > "{{.OUTPUT_FILE}}" 9 | -------------------------------------------------------------------------------- /testdata/includes_shadowed_default/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: Taskfile2.yml 6 | 7 | tasks: 8 | included: 9 | cmds: 10 | - echo "shadowed" > file.txt 11 | -------------------------------------------------------------------------------- /testdata/includes_shadowed_default/Taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - echo "included" > file.txt 7 | -------------------------------------------------------------------------------- /testdata/includes_shadowed_default/file.txt: -------------------------------------------------------------------------------- 1 | shadowed 2 | -------------------------------------------------------------------------------- /testdata/includes_unshadowed_default/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: Taskfile2.yml 6 | -------------------------------------------------------------------------------- /testdata/includes_unshadowed_default/Taskfile2.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - echo "included" > file.txt 7 | -------------------------------------------------------------------------------- /testdata/includes_unshadowed_default/file.txt: -------------------------------------------------------------------------------- 1 | included 2 | -------------------------------------------------------------------------------- /testdata/includes_with_excludes/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: ./included/Taskfile.yml 6 | excludes: 7 | - foo 8 | included_flatten: 9 | taskfile: ./included/Taskfile.yml 10 | flatten: true 11 | excludes: 12 | - bar 13 | 14 | tasks: 15 | default: 16 | cmds: 17 | - echo "called_dep" > called_dep.txt 18 | -------------------------------------------------------------------------------- /testdata/includes_with_excludes/included/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | foo: echo foo 5 | bar: echo bar 6 | -------------------------------------------------------------------------------- /testdata/includes_yaml/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/includes_yaml/Custom.ext: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: ./included 5 | custom: ./included/custom.yaml 6 | 7 | tasks: 8 | default: 9 | cmds: 10 | - task: gen 11 | - task: included:gen 12 | - task: custom:gen 13 | 14 | gen: 15 | cmds: 16 | - echo main > main.txt 17 | -------------------------------------------------------------------------------- /testdata/includes_yaml/included/Taskfile.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen: 5 | cmds: 6 | - echo included_with_yaml_extension > included_with_yaml_extension.txt 7 | -------------------------------------------------------------------------------- /testdata/includes_yaml/included/custom.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen: 5 | cmds: 6 | - echo included_with_custom_file > included_with_custom_file.txt 7 | -------------------------------------------------------------------------------- /testdata/init/.gitignore: -------------------------------------------------------------------------------- 1 | *.yml 2 | -------------------------------------------------------------------------------- /testdata/internal_task/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | task-1: 5 | cmds: 6 | - task: task-3 7 | 8 | task-2: 9 | deps: 10 | - task-3 11 | 12 | task-3: 13 | internal: true 14 | cmds: 15 | - echo "Hello, World!" 16 | -------------------------------------------------------------------------------- /testdata/json_list_format/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | foo: 5 | label: "foobar" 6 | desc: "task description" 7 | -------------------------------------------------------------------------------- /testdata/json_list_format/testdata/TestJsonListFormat.golden: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": [ 3 | { 4 | "name": "foobar", 5 | "task": "foo", 6 | "desc": "task description", 7 | "summary": "", 8 | "aliases": [], 9 | "up_to_date": false, 10 | "location": { 11 | "line": 4, 12 | "column": 3, 13 | "taskfile": "{{ .TaskfileLocation }}" 14 | } 15 | } 16 | ], 17 | "location": "{{ .TaskfileLocation }}" 18 | } 19 | -------------------------------------------------------------------------------- /testdata/label_list/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | foo: 5 | label: "foobar" 6 | desc: "task description" 7 | -------------------------------------------------------------------------------- /testdata/label_list/testdata/TestNoLabelInList.golden: -------------------------------------------------------------------------------- 1 | task: Available tasks for this project: 2 | * foo: task description 3 | -------------------------------------------------------------------------------- /testdata/label_status/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | foo: 5 | label: "foobar" 6 | status: 7 | - "false" 8 | -------------------------------------------------------------------------------- /testdata/label_status/testdata/TestLabel-status-err-status.golden: -------------------------------------------------------------------------------- 1 | task: Task "foobar" is not up-to-date -------------------------------------------------------------------------------- /testdata/label_status/testdata/TestLabel-status.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/label_status/testdata/TestLabel-status.golden -------------------------------------------------------------------------------- /testdata/label_summary/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | foo: 5 | label: "foobar" 6 | desc: description 7 | status: 8 | - echo "I'm ok" 9 | -------------------------------------------------------------------------------- /testdata/label_summary/testdata/TestLabel-label_in_summary.golden: -------------------------------------------------------------------------------- 1 | task: Task "foobar" is up to date 2 | -------------------------------------------------------------------------------- /testdata/label_summary/testdata/TestLabel-summary.golden: -------------------------------------------------------------------------------- 1 | task: foobar 2 | 3 | description 4 | -------------------------------------------------------------------------------- /testdata/label_uptodate/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | foo: 5 | label: "foobar" 6 | status: 7 | - echo "I'm ok" 8 | -------------------------------------------------------------------------------- /testdata/label_uptodate/testdata/TestLabel-up_to_date.golden: -------------------------------------------------------------------------------- 1 | task: Task "foobar" is up to date 2 | -------------------------------------------------------------------------------- /testdata/label_var/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | vars: 4 | BAR: baz 5 | 6 | tasks: 7 | foo: 8 | label: "foo{{.BAR}}" 9 | status: 10 | - echo "I'm ok" 11 | -------------------------------------------------------------------------------- /testdata/label_var/testdata/TestLabel-var.golden: -------------------------------------------------------------------------------- 1 | task: Task "foobaz" is up to date 2 | -------------------------------------------------------------------------------- /testdata/list_desc_interpolation/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | vars: 4 | FOO: foo 5 | BAR: bar 6 | 7 | tasks: 8 | foo: 9 | desc: "task has desc with {{.FOO}}-var" 10 | 11 | bar: 12 | desc: "task has desc with {{.BAR}}-var" 13 | -------------------------------------------------------------------------------- /testdata/list_desc_interpolation/testdata/TestListDescInterpolation.golden: -------------------------------------------------------------------------------- 1 | task: Available tasks for this project: 2 | * bar: task has desc with bar-var 3 | * foo: task has desc with foo-var 4 | -------------------------------------------------------------------------------- /testdata/list_mixed_desc/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | foo: 5 | label: "foobar" 6 | desc: "foo has desc and label" 7 | 8 | voo: 9 | label: "voo has no desc" 10 | 11 | doo: 12 | label: "doo has desc, no label" 13 | -------------------------------------------------------------------------------- /testdata/list_mixed_desc/testdata/TestListAllShowsNoDesc.golden: -------------------------------------------------------------------------------- 1 | task: Available tasks for this project: 2 | * doo: 3 | * foo: foo has desc and label 4 | * voo: 5 | -------------------------------------------------------------------------------- /testdata/list_mixed_desc/testdata/TestListCanListDescOnly.golden: -------------------------------------------------------------------------------- 1 | task: Available tasks for this project: 2 | * foo: foo has desc and label 3 | -------------------------------------------------------------------------------- /testdata/output_group/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | output: 4 | group: 5 | begin: '::group::{{ .TASK }}' 6 | end: '::endgroup::' 7 | 8 | tasks: 9 | hello: 10 | cmds: 11 | - echo 'Hello!' 12 | bye: 13 | deps: 14 | - hello 15 | cmds: 16 | - echo 'Bye!' 17 | -------------------------------------------------------------------------------- /testdata/output_group_error_only/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | 5 | output: 6 | group: 7 | error_only: true 8 | 9 | tasks: 10 | passing: echo 'passing-output' 11 | 12 | failing: 13 | cmds: 14 | - task: passing 15 | - echo 'passing-output-2' 16 | - echo 'passing-output-3' 17 | - echo 'failing-output' && exit 1 18 | -------------------------------------------------------------------------------- /testdata/params/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | vars: 4 | PORTUGUESE_HELLO_WORLD: Olá, mundo! 5 | GERMAN: Hello 6 | 7 | tasks: 8 | default: 9 | vars: 10 | SPANISH: ¡Holla mundo! 11 | PORTUGUESE: "{{.PORTUGUESE_HELLO_WORLD}}" 12 | GERMAN: "Welt!" 13 | deps: 14 | - task: write-file 15 | vars: {CONTENT: Dependence1} 16 | - task: write-file 17 | vars: {CONTENT: Dependence2} 18 | - task: write-file 19 | vars: {CONTENT: "{{.SPANISH|replace \"mundo\" \"dependencia\"}}"} 20 | cmds: 21 | - task: write-file 22 | vars: {CONTENT: Hello} 23 | - task: write-file 24 | vars: {CONTENT: "$echo 'World'"} 25 | - task: write-file 26 | vars: {CONTENT: "!"} 27 | - task: write-file 28 | vars: {CONTENT: "{{.SPANISH}}"} 29 | - task: write-file 30 | vars: {CONTENT: "{{.PORTUGUESE}}"} 31 | - task: write-file 32 | vars: {CONTENT: "{{.GERMAN}}"} 33 | - task: non-default 34 | 35 | write-file: 36 | cmds: 37 | - echo {{.CONTENT}} 38 | 39 | non-default: 40 | vars: 41 | PORTUGUESE: "{{.PORTUGUESE_HELLO_WORLD}}" 42 | cmds: 43 | - task: write-file 44 | vars: {CONTENT: "{{.PORTUGUESE}}"} 45 | -------------------------------------------------------------------------------- /testdata/params/dep1.txt: -------------------------------------------------------------------------------- 1 | Dependence1 2 | -------------------------------------------------------------------------------- /testdata/params/dep2.txt: -------------------------------------------------------------------------------- 1 | Dependence2 2 | -------------------------------------------------------------------------------- /testdata/params/exclamation.txt: -------------------------------------------------------------------------------- 1 | ! 2 | -------------------------------------------------------------------------------- /testdata/params/german.txt: -------------------------------------------------------------------------------- 1 | Welt! 2 | -------------------------------------------------------------------------------- /testdata/params/hello.txt: -------------------------------------------------------------------------------- 1 | Hello 2 | -------------------------------------------------------------------------------- /testdata/params/portuguese.txt: -------------------------------------------------------------------------------- 1 | Olá, mundo! 2 | -------------------------------------------------------------------------------- /testdata/params/portuguese2.txt: -------------------------------------------------------------------------------- 1 | Olá, mundo! 2 | -------------------------------------------------------------------------------- /testdata/params/spanish-dep.txt: -------------------------------------------------------------------------------- 1 | ¡Holla dependencia! 2 | -------------------------------------------------------------------------------- /testdata/params/spanish.txt: -------------------------------------------------------------------------------- 1 | ¡Holla mundo! 2 | -------------------------------------------------------------------------------- /testdata/params/testdata/TestParams.golden: -------------------------------------------------------------------------------- 1 | ! 2 | Dependence1 3 | Dependence2 4 | Hello 5 | Olá, mundo! 6 | Olá, mundo! 7 | Welt! 8 | World 9 | ¡Holla dependencia! 10 | ¡Holla mundo! 11 | -------------------------------------------------------------------------------- /testdata/params/world.txt: -------------------------------------------------------------------------------- 1 | World 2 | -------------------------------------------------------------------------------- /testdata/precondition/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | foo: 5 | preconditions: 6 | - test -f foo.txt 7 | 8 | impossible: 9 | preconditions: 10 | - sh: "[ 1 = 0 ]" 11 | msg: "1 != 0 obviously!" 12 | 13 | depends_on_impossible: 14 | deps: 15 | - impossible 16 | 17 | executes_failing_task_as_cmd: 18 | cmds: 19 | - task: impossible 20 | -------------------------------------------------------------------------------- /testdata/precondition/foo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/precondition/foo.txt -------------------------------------------------------------------------------- /testdata/precondition/testdata/TestPrecondition-a_precondition_has_been_met.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/precondition/testdata/TestPrecondition-a_precondition_has_been_met.golden -------------------------------------------------------------------------------- /testdata/precondition/testdata/TestPrecondition-a_precondition_was_not_met-err-run.golden: -------------------------------------------------------------------------------- 1 | task: precondition not met -------------------------------------------------------------------------------- /testdata/precondition/testdata/TestPrecondition-a_precondition_was_not_met.golden: -------------------------------------------------------------------------------- 1 | task: 1 != 0 obviously! 2 | -------------------------------------------------------------------------------- /testdata/precondition/testdata/TestPrecondition-precondition_in_cmd_fails_the_task-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Failed to run task "executes_failing_task_as_cmd": task: precondition not met -------------------------------------------------------------------------------- /testdata/precondition/testdata/TestPrecondition-precondition_in_cmd_fails_the_task.golden: -------------------------------------------------------------------------------- 1 | task: 1 != 0 obviously! 2 | -------------------------------------------------------------------------------- /testdata/precondition/testdata/TestPrecondition-precondition_in_dependency_fails_the_task-err-run.golden: -------------------------------------------------------------------------------- 1 | task: precondition not met -------------------------------------------------------------------------------- /testdata/precondition/testdata/TestPrecondition-precondition_in_dependency_fails_the_task.golden: -------------------------------------------------------------------------------- 1 | task: 1 != 0 obviously! 2 | -------------------------------------------------------------------------------- /testdata/prompt/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: 3 2 | 3 | tasks: 4 | foo: 5 | prompt: Do you want to continue? 6 | cmds: 7 | - echo 'foo' 8 | 9 | bar: 10 | cmds: 11 | - task: show-prompt 12 | 13 | show-prompt: 14 | prompt: Do you want to continue? 15 | cmds: 16 | - echo 'show-prompt' 17 | 18 | multi-prompt: 19 | prompt: 20 | - Do you want to continue? 21 | - Are you sure? 22 | cmds: 23 | - echo 'multi-prompt' 24 | -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptAssumeYes---yes_flag_should_skip_prompt.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [assuming yes] 2 | task: [foo] echo 'foo' 3 | foo 4 | -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptAssumeYes-task_should_raise_errors.TaskCancelledError-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "foo" cancelled by user -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptAssumeYes-task_should_raise_errors.TaskCancelledError.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [y/N]: -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_Enter_stops_task-test_Enter_stops_task-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "foo" cancelled by user -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_Enter_stops_task-test_Enter_stops_task.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [y/N]: -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_junk_value_stops_task-test_junk_value_stops_task-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "foo" cancelled by user -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_junk_value_stops_task-test_junk_value_stops_task.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [y/N]: -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_long_approval-test_long_approval.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [y/N]: task: [foo] echo 'foo' 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_short_approval-test_short_approval.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [y/N]: task: [foo] echo 'foo' 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_stops_task-test_stops_task-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "foo" cancelled by user -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_stops_task-test_stops_task.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [y/N]: -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptInSummary-test_uppercase_approval-test_uppercase_approval.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [y/N]: task: [foo] echo 'foo' 2 | foo 3 | -------------------------------------------------------------------------------- /testdata/prompt/testdata/TestPromptWithIndirectTask.golden: -------------------------------------------------------------------------------- 1 | Do you want to continue? [y/N]: task: [show-prompt] echo 'show-prompt' 2 | show-prompt 3 | -------------------------------------------------------------------------------- /testdata/requires/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | - task: missing-var 6 | 7 | missing-var: 8 | requires: 9 | vars: 10 | - FOO 11 | cmd: echo "{{.FOO}}" 12 | 13 | var-defined-in-task: 14 | vars: 15 | FOO: bar 16 | requires: 17 | vars: 18 | - FOO 19 | cmd: echo "{{.FOO}}" 20 | 21 | validation-var-dynamic: 22 | vars: 23 | FOO: 24 | sh: echo "one" 25 | requires: 26 | vars: 27 | - name: FOO 28 | enum: ['one', 'two'] 29 | 30 | validation-var: 31 | requires: 32 | vars: 33 | - ENV 34 | - name: FOO 35 | enum: ['one', 'two'] 36 | 37 | require-before-compile: 38 | requires: 39 | vars: [ MY_VAR ] 40 | cmd: | 41 | {{range .MY_VAR | splitList " " }} 42 | echo {{.}} 43 | {{end}} 44 | -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-fails_validation-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "validation-var" cancelled because it is missing required variables: 2 | - FOO has an invalid value : 'bar' (allowed values : [one two]) 3 | -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-fails_validation.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/requires/testdata/TestRequires-fails_validation.golden -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-passes_validation.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/requires/testdata/TestRequires-passes_validation.golden -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-require_before_compile-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "require-before-compile" cancelled because it is missing required variables: MY_VAR -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-require_before_compile.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/requires/testdata/TestRequires-require_before_compile.golden -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-required_var_missing-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "missing-var" cancelled because it is missing required variables: FOO -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-required_var_missing.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/requires/testdata/TestRequires-required_var_missing.golden -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-required_var_missing_+_fails_validation#01.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/requires/testdata/TestRequires-required_var_missing_+_fails_validation#01.golden -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-required_var_missing_+_fails_validation-err-run.golden: -------------------------------------------------------------------------------- 1 | task: Task "validation-var" cancelled because it is missing required variables: ENV, FOO (allowed values: [one two]) -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-required_var_missing_+_fails_validation.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/requires/testdata/TestRequires-required_var_missing_+_fails_validation.golden -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-required_var_ok.golden: -------------------------------------------------------------------------------- 1 | task: [missing-var] echo "bar" 2 | bar 3 | -------------------------------------------------------------------------------- /testdata/requires/testdata/TestRequires-var_defined_in_task.golden: -------------------------------------------------------------------------------- 1 | task: [var-defined-in-task] echo "bar" 2 | bar 3 | -------------------------------------------------------------------------------- /testdata/run/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/run/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | run: when_changed 3 | 4 | tasks: 5 | generate-hash: 6 | - rm -f hash.txt 7 | - task: input-content 8 | vars: { CONTENT: '1' } 9 | - task: input-content 10 | vars: { CONTENT: '2' } 11 | - task: input-content 12 | vars: { CONTENT: '2' } 13 | 14 | input-content: 15 | deps: 16 | - task: create-output 17 | vars: { CONTENT: '1' } 18 | cmds: 19 | - echo {{.CONTENT}} >> hash.txt 20 | 21 | create-output: 22 | run: once 23 | cmds: 24 | - echo starting {{.CONTENT}} >> hash.txt 25 | -------------------------------------------------------------------------------- /testdata/run_once_shared_deps/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | service-a: ./service-a 5 | service-b: ./service-b 6 | 7 | tasks: 8 | build: 9 | deps: 10 | - service-a:build 11 | - service-b:build 12 | -------------------------------------------------------------------------------- /testdata/run_once_shared_deps/library/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | build: 5 | run: once 6 | cmds: 7 | - echo "build library" 8 | sources: 9 | - src/**/* 10 | -------------------------------------------------------------------------------- /testdata/run_once_shared_deps/service-a/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | library: 5 | taskfile: ../library/Taskfile.yml 6 | dir: ../library 7 | 8 | tasks: 9 | build: 10 | run: once 11 | deps: [library:build] 12 | cmds: 13 | - echo "build a" 14 | sources: 15 | - src/**/* 16 | -------------------------------------------------------------------------------- /testdata/run_once_shared_deps/service-a/src/imasource.go: -------------------------------------------------------------------------------- 1 | package main 2 | -------------------------------------------------------------------------------- /testdata/run_once_shared_deps/service-b/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | library: 5 | taskfile: ../library/Taskfile.yml 6 | dir: ../library 7 | 8 | tasks: 9 | build: 10 | run: once 11 | deps: [library:build] 12 | cmds: 13 | - echo "build b" 14 | sources: 15 | - src/**/* 16 | -------------------------------------------------------------------------------- /testdata/run_once_shared_deps/service-b/src/imasource.go: -------------------------------------------------------------------------------- 1 | package main 2 | -------------------------------------------------------------------------------- /testdata/shopts/command_level/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | 5 | tasks: 6 | pipefail: 7 | cmds: 8 | - cmd: set -o | grep pipefail 9 | set: [pipefail] 10 | 11 | globstar: 12 | cmds: 13 | - cmd: shopt | grep globstar 14 | shopt: [globstar] 15 | -------------------------------------------------------------------------------- /testdata/shopts/global_level/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | set: [pipefail] 5 | shopt: [globstar] 6 | 7 | tasks: 8 | pipefail: 9 | cmds: 10 | - set -o | grep pipefail 11 | 12 | globstar: 13 | cmds: 14 | - shopt | grep globstar 15 | -------------------------------------------------------------------------------- /testdata/shopts/task_level/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | 5 | tasks: 6 | pipefail: 7 | set: [pipefail] 8 | cmds: 9 | - set -o | grep pipefail 10 | 11 | globstar: 12 | shopt: [globstar] 13 | cmds: 14 | - shopt | grep globstar 15 | -------------------------------------------------------------------------------- /testdata/short_task_notation/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | - task: string-slice 6 | - task: string 7 | 8 | string-slice: 9 | - echo "string-slice-1" 10 | - echo "string-slice-2" 11 | 12 | string: echo "string" 13 | -------------------------------------------------------------------------------- /testdata/single_cmd_dep/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/single_cmd_dep/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | tasks: 4 | foo: 5 | deps: [bar] 6 | cmd: echo foo > foo.txt 7 | 8 | bar: echo bar > bar.txt 9 | -------------------------------------------------------------------------------- /testdata/special_vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: ./included 6 | dir: ./included 7 | 8 | tasks: 9 | print-task: 10 | aliases: [echo-task] 11 | cmds: 12 | - echo {{.TASK}} 13 | print-root-dir: echo {{.ROOT_DIR}} 14 | print-taskfile: echo {{.TASKFILE}} 15 | print-taskfile-dir: echo {{.TASKFILE_DIR}} 16 | print-task-version: echo {{.TASK_VERSION}} 17 | print-task-alias: 18 | aliases: [echo-task-alias] 19 | cmds: 20 | - echo "{{.ALIAS}}" 21 | print-task-alias-default: echo "{{.ALIAS}}" 22 | print-task-dir: 23 | dir: 'foo' 24 | cmd: echo {{.TASK_DIR}} 25 | -------------------------------------------------------------------------------- /testdata/special_vars/included/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | print-task: 5 | aliases: [echo-task] 6 | cmds: 7 | - echo {{.TASK}} 8 | print-root-dir: echo {{.ROOT_DIR}} 9 | print-taskfile: echo {{.TASKFILE}} 10 | print-taskfile-dir: echo {{.TASKFILE_DIR}} 11 | print-task-version: echo {{.TASK_VERSION}} 12 | print-task-alias: 13 | aliases: [echo-task-alias] 14 | cmds: 15 | - echo "{{.ALIAS}}" 16 | print-task-alias-default: echo "{{.ALIAS}}" 17 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/special_vars/subdir/.gitkeep -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-included-print-root-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars 2 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-included-print-task.golden: -------------------------------------------------------------------------------- 1 | included:print-task 2 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-included-print-taskfile-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars/included 2 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-included-print-taskfile.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars/included/Taskfile.yml 2 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-print-root-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars 2 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-print-task-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars/foo 2 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-print-task.golden: -------------------------------------------------------------------------------- 1 | print-task 2 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-print-taskfile-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars 2 | -------------------------------------------------------------------------------- /testdata/special_vars/subdir/testdata/TestSpecialVars-testdata-special_vars-subdir-print-taskfile.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars/Taskfile.yml 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-included-print-root-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-included-print-task.golden: -------------------------------------------------------------------------------- 1 | included:print-task 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-included-print-taskfile-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars/included 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-included-print-taskfile.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars/included/Taskfile.yml 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-print-root-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-print-task-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars/foo 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-print-task.golden: -------------------------------------------------------------------------------- 1 | print-task 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-print-taskfile-dir.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars 2 | -------------------------------------------------------------------------------- /testdata/special_vars/testdata/TestSpecialVars-testdata-special_vars-print-taskfile.golden: -------------------------------------------------------------------------------- 1 | /testdata/special_vars/Taskfile.yml 2 | -------------------------------------------------------------------------------- /testdata/split_args/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - cmd: echo '{{splitArgs .CLI_ARGS | len}}' 7 | -------------------------------------------------------------------------------- /testdata/status/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/status/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | gen-foo: 5 | cmds: 6 | - touch foo.txt 7 | sources: 8 | - ./foo.txt 9 | status: 10 | - test 1 = 0 11 | 12 | gen-bar: 13 | cmds: 14 | - touch bar.txt 15 | sources: 16 | - ./bar.txt 17 | status: 18 | - test 1 = 1 19 | 20 | gen-silent-baz: 21 | silent: true 22 | cmds: 23 | - touch baz.txt 24 | sources: 25 | - ./baz.txt 26 | -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-bar_1_silent.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/status/testdata/TestStatus-run_gen-bar_1_silent.golden -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-bar_2_silent.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/status/testdata/TestStatus-run_gen-bar_2_silent.golden -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-bar_3_silent.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/status/testdata/TestStatus-run_gen-bar_3_silent.golden -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-bar_4_silent.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/status/testdata/TestStatus-run_gen-bar_4_silent.golden -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-bar_5.golden: -------------------------------------------------------------------------------- 1 | task: [gen-bar] touch bar.txt 2 | -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-bar_6.golden: -------------------------------------------------------------------------------- 1 | task: Task "gen-bar" is up to date 2 | -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-baz_2.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/status/testdata/TestStatus-run_gen-baz_2.golden -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-baz_3.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/status/testdata/TestStatus-run_gen-baz_3.golden -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-baz_4_verbose.golden: -------------------------------------------------------------------------------- 1 | task: "gen-silent-baz" started 2 | task: Task "gen-silent-baz" is up to date 3 | -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-baz_silent.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/status/testdata/TestStatus-run_gen-baz_silent.golden -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-foo_1_silent.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/status/testdata/TestStatus-run_gen-foo_1_silent.golden -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-foo_2.golden: -------------------------------------------------------------------------------- 1 | task: [gen-foo] touch foo.txt 2 | -------------------------------------------------------------------------------- /testdata/status/testdata/TestStatus-run_gen-foo_3.golden: -------------------------------------------------------------------------------- 1 | task: [gen-foo] touch foo.txt 2 | -------------------------------------------------------------------------------- /testdata/status_vars/.gitignore: -------------------------------------------------------------------------------- 1 | generated.txt 2 | -------------------------------------------------------------------------------- /testdata/status_vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | build-checksum: 5 | sources: 6 | - ./source.txt 7 | status: 8 | - echo "{{.CHECKSUM}}" 9 | 10 | build-ts: 11 | method: timestamp 12 | sources: 13 | - ./source.txt 14 | status: 15 | - echo '{{.TIMESTAMP.Unix}}' 16 | - echo '{{.TIMESTAMP}}' 17 | -------------------------------------------------------------------------------- /testdata/status_vars/source.txt: -------------------------------------------------------------------------------- 1 | Hello, World! 2 | -------------------------------------------------------------------------------- /testdata/summary/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | task-with-summary: 5 | deps: [dependent-task-1, dependent-task-2] 6 | summary: | 7 | summary of task-with-summary - line 1 8 | line 2 9 | line 3 10 | cmds: 11 | - echo 'task-with-summary was executed' 12 | - echo 'another command' 13 | - exit 0 14 | 15 | other-task-with-summary: 16 | summary: summary of other-task-with-summary 17 | cmds: 18 | - echo 'other-task-with-summary was executed' 19 | 20 | dependent-task-1: 21 | cmds: 22 | - echo 'dependent-task-1 was executed' 23 | 24 | dependent-task-2: 25 | cmds: 26 | - echo 'dependent-task-2 was executed' 27 | -------------------------------------------------------------------------------- /testdata/summary/task-with-summary.txt: -------------------------------------------------------------------------------- 1 | task: task-with-summary 2 | 3 | summary of task-with-summary - line 1 4 | line 2 5 | line 3 6 | 7 | dependencies: 8 | - dependent-task-1 9 | - dependent-task-2 10 | 11 | commands: 12 | - echo 'task-with-summary was executed' 13 | - echo 'another command' 14 | - exit 0 15 | 16 | 17 | task: other-task-with-summary 18 | 19 | summary of other-task-with-summary 20 | 21 | commands: 22 | - echo 'other-task-with-summary was executed' 23 | -------------------------------------------------------------------------------- /testdata/taskfile_walk/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - echo 'foo' 7 | silent: true 8 | -------------------------------------------------------------------------------- /testdata/taskfile_walk/foo/bar/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/taskfile_walk/foo/bar/.gitkeep -------------------------------------------------------------------------------- /testdata/user_working_dir/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - echo '{{.USER_WORKING_DIR}}' 7 | silent: true 8 | -------------------------------------------------------------------------------- /testdata/user_working_dir_with_includes/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | includes: 4 | included: 5 | taskfile: ./included/Taskfile.yml 6 | -------------------------------------------------------------------------------- /testdata/user_working_dir_with_includes/included/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | echo: 5 | dir: '{{.USER_WORKING_DIR}}' 6 | cmds: 7 | - pwd 8 | silent: true 9 | -------------------------------------------------------------------------------- /testdata/user_working_dir_with_includes/somedir/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/testdata/user_working_dir_with_includes/somedir/.keep -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-global-dotenv/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | 7 | tasks: 8 | default: 9 | cmds: 10 | - 'echo "{{.VAR}}"' 11 | - 'echo "$ENV"' 12 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-global-dotenv/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-global-dotenv/testdata/TestVarInheritance-entrypoint-global-dotenv.golden: -------------------------------------------------------------------------------- 1 | entrypoint-global-dotenv 2 | entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-global-vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | tasks: 12 | default: 13 | cmds: 14 | - 'echo "{{.VAR}}"' 15 | - 'echo "$ENV"' 16 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-global-vars/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-global-vars/testdata/TestVarInheritance-entrypoint-global-vars.golden: -------------------------------------------------------------------------------- 1 | entrypoint-global-vars 2 | entrypoint-global-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-dotenv/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | tasks: 12 | default: 13 | dotenv: 14 | - 'task.env' 15 | cmds: 16 | - task: called-task 17 | vars: 18 | VAR: entrypoint-task-call-vars 19 | 20 | called-task: 21 | dotenv: 22 | - 'called-task.env' 23 | cmds: 24 | - 'echo "{{.VAR}}"' 25 | - 'echo "$ENV"' 26 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-dotenv/called-task.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-task-call-dotenv 2 | ENV=entrypoint-task-call-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-dotenv/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-dotenv/task.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-task-dotenv 2 | ENV=entrypoint-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-dotenv/testdata/TestVarInheritance-entrypoint-task-call-dotenv.golden: -------------------------------------------------------------------------------- 1 | entrypoint-task-call-vars 2 | entrypoint-task-call-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-task-vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | tasks: 12 | default: 13 | dotenv: 14 | - 'task.env' 15 | cmds: 16 | - task: called-task 17 | vars: 18 | VAR: entrypoint-task-call-vars 19 | 20 | called-task: 21 | vars: 22 | VAR: entrypoint-task-call-task-vars 23 | env: 24 | ENV: entrypoint-task-call-task-vars 25 | cmds: 26 | - 'echo "{{.VAR}}"' 27 | - 'echo "$ENV"' 28 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-task-vars/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-task-vars/task.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-task-dotenv 2 | ENV=entrypoint-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-task-vars/testdata/TestVarInheritance-entrypoint-task-call-task-vars.golden: -------------------------------------------------------------------------------- 1 | entrypoint-task-call-task-vars 2 | entrypoint-task-call-task-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | tasks: 12 | default: 13 | dotenv: 14 | - 'task.env' 15 | cmds: 16 | - task: called-task 17 | vars: 18 | VAR: entrypoint-task-call-vars 19 | 20 | called-task: 21 | cmds: 22 | - 'echo "{{.VAR}}"' 23 | - 'echo "$ENV"' 24 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-vars/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-vars/task.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-task-dotenv 2 | ENV=entrypoint-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-call-vars/testdata/TestVarInheritance-entrypoint-task-call-vars.golden: -------------------------------------------------------------------------------- 1 | entrypoint-task-call-vars 2 | entrypoint-global-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-dotenv/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | tasks: 12 | default: 13 | dotenv: 14 | - 'task.env' 15 | cmds: 16 | - 'echo "{{.VAR}}"' 17 | - 'echo "$ENV"' 18 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-dotenv/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-dotenv/task.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-task-dotenv 2 | ENV=entrypoint-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-dotenv/testdata/TestVarInheritance-entrypoint-task-dotenv.golden: -------------------------------------------------------------------------------- 1 | entrypoint-global-vars 2 | entrypoint-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | tasks: 12 | default: 13 | dotenv: 14 | - 'task.env' 15 | vars: 16 | VAR: entrypoint-task-vars 17 | env: 18 | ENV: entrypoint-task-vars 19 | cmds: 20 | - 'echo "{{.VAR}}"' 21 | - 'echo "$ENV"' 22 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-vars/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-vars/task.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-task-dotenv 2 | ENV=entrypoint-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/entrypoint-task-vars/testdata/TestVarInheritance-entrypoint-task-vars.golden: -------------------------------------------------------------------------------- 1 | entrypoint-task-vars 2 | entrypoint-task-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-global-vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | includes: 12 | included: included.yml 13 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-global-vars/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-global-vars/included.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | vars: 5 | VAR: included-global-vars 6 | env: 7 | ENV: included-global-vars 8 | 9 | tasks: 10 | default: 11 | cmds: 12 | - 'echo "{{.VAR}}"' 13 | - 'echo "$ENV"' 14 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-global-vars/testdata/TestVarInheritance-included-global-vars.golden: -------------------------------------------------------------------------------- 1 | included-global-vars 2 | included-global-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-dotenv/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | includes: 12 | included: included.yml 13 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-dotenv/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-dotenv/included.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | vars: 5 | VAR: included-global-vars 6 | env: 7 | ENV: included-global-vars 8 | 9 | tasks: 10 | default: 11 | dotenv: 12 | - 'task.env' 13 | cmds: 14 | - task: called-task 15 | vars: 16 | VAR: included-task-call-vars 17 | 18 | called-task: 19 | cmds: 20 | - 'echo "{{.VAR}}"' 21 | - 'echo "$ENV"' 22 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-dotenv/task.env: -------------------------------------------------------------------------------- 1 | VAR=included-task-dotenv 2 | ENV=included-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-dotenv/testdata/TestVarInheritance-included-task-call-dotenv.golden: -------------------------------------------------------------------------------- 1 | included-task-call-vars 2 | included-global-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-task-vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | includes: 12 | included: included.yml 13 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-task-vars/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-task-vars/included.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | vars: 5 | VAR: included-global-vars 6 | env: 7 | ENV: included-global-vars 8 | 9 | tasks: 10 | default: 11 | dotenv: 12 | - 'task.env' 13 | cmds: 14 | - task: called-task 15 | vars: 16 | VAR: included-task-call-vars 17 | 18 | called-task: 19 | vars: 20 | VAR: included-task-call-task-vars 21 | env: 22 | ENV: included-task-call-task-vars 23 | cmds: 24 | - 'echo "{{.VAR}}"' 25 | - 'echo "$ENV"' 26 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-task-vars/task.env: -------------------------------------------------------------------------------- 1 | VAR=included-task-dotenv 2 | ENV=included-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-task-vars/testdata/TestVarInheritance-included-task-call-task-vars.golden: -------------------------------------------------------------------------------- 1 | included-task-call-task-vars 2 | included-task-call-task-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | includes: 12 | included: included.yml 13 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-vars/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-vars/included.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | vars: 5 | VAR: included-global-vars 6 | env: 7 | ENV: included-global-vars 8 | 9 | tasks: 10 | default: 11 | dotenv: 12 | - 'task.env' 13 | cmds: 14 | - task: called-task 15 | vars: 16 | VAR: included-task-call-vars 17 | 18 | called-task: 19 | cmds: 20 | - 'echo "{{.VAR}}"' 21 | - 'echo "$ENV"' 22 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-vars/task.env: -------------------------------------------------------------------------------- 1 | VAR=included-task-dotenv 2 | ENV=included-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-call-vars/testdata/TestVarInheritance-included-task-call-vars.golden: -------------------------------------------------------------------------------- 1 | included-task-call-vars 2 | included-global-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-dotenv/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | includes: 12 | included: included.yml 13 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-dotenv/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-dotenv/included.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | vars: 5 | VAR: included-global-vars 6 | env: 7 | ENV: included-global-vars 8 | 9 | tasks: 10 | default: 11 | dotenv: 12 | - 'task.env' 13 | cmds: 14 | - 'echo "{{.VAR}}"' 15 | - 'echo "$ENV"' 16 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-dotenv/task.env: -------------------------------------------------------------------------------- 1 | VAR=included-task-dotenv 2 | ENV=included-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-dotenv/testdata/TestVarInheritance-included-task-dotenv.golden: -------------------------------------------------------------------------------- 1 | included-global-vars 2 | included-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | includes: 12 | included: included.yml 13 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-vars/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-vars/included.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | vars: 5 | VAR: included-global-vars 6 | env: 7 | ENV: included-global-vars 8 | 9 | tasks: 10 | default: 11 | dotenv: 12 | - 'task.env' 13 | vars: 14 | VAR: included-task-vars 15 | env: 16 | ENV: included-task-vars 17 | cmds: 18 | - 'echo "{{.VAR}}"' 19 | - 'echo "$ENV"' 20 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-vars/task.env: -------------------------------------------------------------------------------- 1 | VAR=included-task-dotenv 2 | ENV=included-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task-vars/testdata/TestVarInheritance-included-task-vars.golden: -------------------------------------------------------------------------------- 1 | included-task-vars 2 | included-task-vars 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | dotenv: 5 | - 'global.env' 6 | vars: 7 | VAR: entrypoint-global-vars 8 | env: 9 | ENV: entrypoint-global-vars 10 | 11 | includes: 12 | included: included.yml 13 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task/global.env: -------------------------------------------------------------------------------- 1 | VAR=entrypoint-global-dotenv 2 | ENV=entrypoint-global-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task/included.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | vars: 5 | VAR: included-global-vars 6 | env: 7 | ENV: included-global-vars 8 | 9 | tasks: 10 | default: 11 | dotenv: 12 | - 'task.env' 13 | cmds: 14 | - 'echo "{{.VAR}}"' 15 | - 'echo "$ENV"' 16 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/included-task/task.env: -------------------------------------------------------------------------------- 1 | VAR=included-task-dotenv 2 | ENV=included-task-dotenv 3 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/shell/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | silent: true 4 | 5 | tasks: 6 | default: 7 | cmds: 8 | - 'echo "{{.VAR}}"' 9 | - 'echo "$ENV"' 10 | -------------------------------------------------------------------------------- /testdata/var_inheritance/v3/shell/testdata/TestVarInheritance-shell.golden: -------------------------------------------------------------------------------- 1 | shell 2 | shell 3 | -------------------------------------------------------------------------------- /testdata/var_references/testdata/TestReference-reference_in_command.golden: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /testdata/var_references/testdata/TestReference-reference_in_dependency.golden: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /testdata/var_references/testdata/TestReference-reference_using_templating_resolver.golden: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /testdata/var_references/testdata/TestReference-reference_using_templating_resolver_and_dynamic_var.golden: -------------------------------------------------------------------------------- 1 | Alice has 3 children called Bob, Charlie, and Diane 2 | -------------------------------------------------------------------------------- /testdata/vars/.env: -------------------------------------------------------------------------------- 1 | DOT_ENV_VAR=From .env file 2 | -------------------------------------------------------------------------------- /testdata/vars/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /testdata/vars/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | dotenv: [.env] 4 | 5 | vars: 6 | VAR_A: A 7 | VAR_B: '{{.VAR_A}}B' 8 | VAR_C: '{{.VAR_B}}C' 9 | 10 | VAR_1: {sh: echo 1} 11 | VAR_2: {sh: 'echo "{{.VAR_1}}2"'} 12 | VAR_3: {sh: 'echo "{{.VAR_2}}3"'} 13 | 14 | tasks: 15 | default: 16 | - task: missing-var 17 | - task: var-order 18 | - task: dependent-sh 19 | - task: with-call 20 | - task: from-dot-env 21 | 22 | missing-var: echo '{{.NON_EXISTING_VAR}}' 23 | 24 | var-order: 25 | vars: 26 | VAR_D: '{{.VAR_C}}D' 27 | VAR_E: '{{.VAR_D}}E' 28 | VAR_F: '{{.VAR_E}}F' 29 | cmds: 30 | - echo '{{.VAR_F}}' 31 | 32 | dependent-sh: 33 | vars: 34 | VAR_4: {sh: 'echo "{{.VAR_3}}4"'} 35 | VAR_5: {sh: 'echo "{{.VAR_4}}5"'} 36 | VAR_6: {sh: 'echo "{{.VAR_5}}6"'} 37 | cmds: 38 | - echo '{{.VAR_6}}' 39 | 40 | with-call: 41 | - task: called-task 42 | vars: 43 | ABC123: '{{.VAR_C}}{{.VAR_3}}' 44 | 45 | called-task: 46 | vars: 47 | MESSAGE: Hi, {{.ABC123}}! 48 | cmds: 49 | - echo "{{.MESSAGE}}" 50 | 51 | from-dot-env: echo '{{.DOT_ENV_VAR}}' 52 | -------------------------------------------------------------------------------- /testdata/vars/any/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Alice", 3 | "age": 30, 4 | "children": [ 5 | { 6 | "name": "Bob", 7 | "age": 5 8 | }, 9 | { 10 | "name": "Charlie", 11 | "age": 3 12 | }, 13 | { 14 | "name": "Diane", 15 | "age": 1 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /testdata/vars/any/example.yaml: -------------------------------------------------------------------------------- 1 | name: Alice 2 | age: 30 3 | children: 4 | - name: Bob 5 | age: 5 6 | - name: Charlie 7 | age: 3 8 | - name: Diane 9 | age: 1 10 | -------------------------------------------------------------------------------- /testdata/vars/testdata/TestVars.golden: -------------------------------------------------------------------------------- 1 | 2 | ABCDEF 3 | 123456 4 | Hi, ABC123! 5 | From .env file 6 | -------------------------------------------------------------------------------- /testdata/version/v1/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "1" 2 | tasks: 3 | foo: 4 | cmds: 5 | - echo "Foo" 6 | 7 | bar: 8 | cmds: 9 | - echo "Bar" 10 | -------------------------------------------------------------------------------- /testdata/version/v2/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | tasks: 4 | foo: 5 | cmds: 6 | - echo "Foo" 7 | bar: 8 | cmds: 9 | - echo "Bar" 10 | -------------------------------------------------------------------------------- /testdata/version/v3/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | tasks: 4 | foo: 5 | cmds: 6 | - echo "Foo" 7 | bar: 8 | cmds: 9 | - echo "Bar" 10 | -------------------------------------------------------------------------------- /testdata/watch/.gitignore: -------------------------------------------------------------------------------- 1 | src/* 2 | -------------------------------------------------------------------------------- /testdata/watch/Taskfile.yaml: -------------------------------------------------------------------------------- 1 | # https://taskfile.dev 2 | 3 | version: '3' 4 | 5 | tasks: 6 | default: 7 | sources: 8 | - "src/*" 9 | cmds: 10 | - echo "Task running!" 11 | -------------------------------------------------------------------------------- /testdata/wildcards/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: 3 2 | 3 | tasks: 4 | wildcard-*: 5 | cmds: 6 | - echo "Hello {{index .MATCH 0}}" 7 | 8 | wildcard-*-*: 9 | cmds: 10 | - echo "Hello {{index .MATCH 0}}" 11 | 12 | '*-wildcard-*': 13 | cmds: 14 | - echo "Hello {{index .MATCH 0}} {{index .MATCH 1}}" 15 | 16 | # Matches is empty when you call the task name exactly (i.e. `task matches-exactly-*`) 17 | matches-exactly-*: 18 | cmds: 19 | - "echo \"I don't consume matches: {{.MATCH}}\"" 20 | 21 | start-*: 22 | vars: 23 | SERVICE: "{{index .MATCH 0}}" 24 | cmds: 25 | - echo "Starting {{.SERVICE}}" 26 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | i18n 11 | 12 | # Misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /website/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/website/.nojekyll -------------------------------------------------------------------------------- /website/babel.config.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | presets: ['@docusaurus/core/lib/babel/preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /website/blog/authors.yml: -------------------------------------------------------------------------------- 1 | andreynering: 2 | name: Andrey Nering 3 | title: Maintainer of Task 4 | url: https://github.com/andreynering 5 | image_url: https://github.com/andreynering.png 6 | pd93: 7 | name: Pete Davison 8 | title: Maintainer of Task 9 | url: https://github.com/pd93 10 | image_url: https://github.com/pd93.png 11 | -------------------------------------------------------------------------------- /website/constants.ts: -------------------------------------------------------------------------------- 1 | export const GITHUB_URL = 'https://github.com/go-task/task'; 2 | export const TWITTER_URL = 'https://twitter.com/taskfiledev'; 3 | export const BLUESKY_URL = 'https://bsky.app/profile/taskfile.dev'; 4 | export const MASTODON_URL = 'https://fosstodon.org/@task'; 5 | export const DISCORD_URL = 'https://discord.gg/6TY36E39UK'; 6 | export const STACK_OVERFLOW = 'https://stackoverflow.com/questions/tagged/taskfile'; 7 | export const ANSWER_OVERFLOW = 'https://www.answeroverflow.com/c/974121106208354339'; 8 | -------------------------------------------------------------------------------- /website/docs/deprecations/completion_scripts.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | slug: /deprecations/completion-scripts/ 3 | --- 4 | 5 | # Completion Scripts 6 | 7 | :::warning 8 | 9 | This deprecation breaks the following functionality: 10 | 11 | - Any direct references to the completion scripts in the Task git repository 12 | 13 | ::: 14 | 15 | Direct use of the completion scripts in the `completion/*` directory of the 16 | [github.com/go-task/task][task] Git repository is deprecated. Any shell 17 | configuration that directly refers to these scripts will potentially break in 18 | the future as the scripts may be moved or deleted entirely. Any configuration 19 | should be updated to use the [new method for generating shell 20 | completions][completions] instead. 21 | 22 | {/* prettier-ignore-start */} 23 | [completions]: ../installation.mdx#setup-completions 24 | [task]: https://github.com/go-task/task 25 | {/* prettier-ignore-end */} 26 | -------------------------------------------------------------------------------- /website/docs/deprecations/deprecations.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | slug: /deprecations/ 3 | sidebar_position: 8 4 | --- 5 | 6 | # Deprecations 7 | 8 | As Task evolves, it occasionally outgrows some of its functionality. This can be 9 | because they are no longer useful, because another feature has replaced it or 10 | because of a change in the way that Task works internally. 11 | 12 | When this happens, we mark the functionality as deprecated. This means that it 13 | will be removed in a future version of Task. This functionality will continue to 14 | work until that time, but we strongly recommend that you do not implement this 15 | functionality in new Taskfiles and make a plan to migrate away from it as soon 16 | as possible. 17 | 18 | You can view a full list of active deprecations in the "Deprecations" section of 19 | the sidebar. 20 | -------------------------------------------------------------------------------- /website/docs/deprecations/template.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | # This is a template for an experiments documentation 3 | # Copy this page and fill in the details as necessary 4 | title: '--- Template ---' 5 | sidebar_position: -1 # Always push to the top 6 | draft: true # Hide in production 7 | --- 8 | 9 | # \{Name of Deprecated Feature\} (#\{Issue\}) 10 | 11 | :::warning 12 | 13 | This deprecation breaks the following functionality: 14 | 15 | - \{list any existing functionality that will be broken by this deprecation\} 16 | - \{if there are no breaking changes, remove this admonition\} 17 | 18 | ::: 19 | 20 | \{Short description of the feature/behavior and why it is being deprecated\} 21 | 22 | \{Short explanation of any replacement features/behaviors and how users should 23 | migrate to it\} 24 | -------------------------------------------------------------------------------- /website/docs/deprecations/template_functions.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | slug: /deprecations/template-functions/ 3 | --- 4 | 5 | # Template Functions 6 | 7 | :::warning 8 | 9 | This deprecation breaks the following functionality: 10 | 11 | - A small set of templating functions 12 | 13 | ::: 14 | 15 | The following templating functions are deprecated. Any replacement functions are 16 | listed besides the function being removed. 17 | 18 | | Deprecated function | Replaced by | 19 | | ------------------- | ----------- | 20 | | `IsSH` | - | 21 | | `FromSlash` | `fromSlash` | 22 | | `ToSlash` | `toSlash` | 23 | | `ExeExt` | `exeExt` | 24 | -------------------------------------------------------------------------------- /website/docs/experiments/template.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | # This is a template for an experiments documentation 3 | # Copy this page and fill in the details as necessary 4 | title: '--- Template ---' 5 | sidebar_position: -1 # Always push to the top 6 | draft: true # Hide in production 7 | --- 8 | 9 | # \{Name of Experiment\} (#\{Issue\}) 10 | 11 | :::caution 12 | 13 | All experimental features are subject to breaking changes and/or removal _at any 14 | time_. We strongly recommend that you do not use these features in a production 15 | environment. They are intended for testing and feedback only. 16 | 17 | ::: 18 | 19 | :::warning 20 | 21 | This experiment breaks the following functionality: 22 | 23 | - \{list any existing functionality that will be broken by this experiment\} 24 | - \{if there are no breaking changes, remove this admonition\} 25 | 26 | ::: 27 | 28 | :::info 29 | 30 | To enable this experiment, set the environment variable: `TASK_X_{feature}=1`. 31 | Check out [our guide to enabling experiments ][enabling-experiments] for more 32 | information. 33 | 34 | ::: 35 | 36 | \{Short description of the feature\} 37 | 38 | \{Short explanation of how users should migrate to the new behavior\} 39 | 40 | {/* prettier-ignore-start */} 41 | [enabling-experiments]: ./experiments.mdx#enabling-experiments 42 | {/* prettier-ignore-end */} 43 | -------------------------------------------------------------------------------- /website/docs/reference/_category_.yml: -------------------------------------------------------------------------------- 1 | position: 5 2 | label: Reference 3 | -------------------------------------------------------------------------------- /website/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | trailingComma: 'none', 3 | singleQuote: true, 4 | overrides: [ 5 | { 6 | files: ['*.md', '*.mdx'], 7 | options: { 8 | printWidth: 80, 9 | proseWrap: 'always' 10 | } 11 | } 12 | ] 13 | }; 14 | -------------------------------------------------------------------------------- /website/sidebars.ts: -------------------------------------------------------------------------------- 1 | import { SidebarsConfig } from '@docusaurus/plugin-content-docs'; 2 | 3 | export default { 4 | taskSidebar: [ 5 | { 6 | type: 'autogenerated', 7 | dirName: '.' 8 | }, 9 | { 10 | type: 'html', 11 | value: '' 12 | } 13 | ], 14 | } satisfies SidebarsConfig; 15 | -------------------------------------------------------------------------------- /website/src/components/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/website/src/components/.keep -------------------------------------------------------------------------------- /website/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/website/static/.nojekyll -------------------------------------------------------------------------------- /website/static/CNAME: -------------------------------------------------------------------------------- 1 | taskfile.dev 2 | -------------------------------------------------------------------------------- /website/static/Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | tasks: 4 | default: 5 | cmds: 6 | - task: hello 7 | 8 | hello: 9 | cmds: 10 | - echo "Hello Task!" 11 | 12 | special-variables: 13 | silent: true 14 | cmds: 15 | - 'echo "CLI_ARGS: {{.CLI_ARGS}}"' 16 | - 'echo "CLI_ARGS_LIST: {{.CLI_ARGS_LIST}}"' 17 | - 'echo "CLI_ARGS_FORCE: {{.CLI_ARGS_FORCE}}"' 18 | - 'echo "CLI_ARGS_SILENT: {{.CLI_ARGS_SILENT}}"' 19 | - 'echo "CLI_ARGS_VERBOSE: {{.CLI_ARGS_VERBOSE}}"' 20 | - 'echo "CLI_ARGS_OFFLINE: {{.CLI_ARGS_OFFLINE}}"' 21 | - 'echo "TASK: {{.TASK}}"' 22 | - 'echo "ALIAS: {{.ALIAS}}"' 23 | - 'echo "TASK_EXE: {{.TASK_EXE}}"' 24 | - 'echo "ROOT_TASKFILE: {{.ROOT_TASKFILE}}"' 25 | - 'echo "ROOT_DIR: {{.ROOT_DIR}}"' 26 | - 'echo "TASKFILE: {{.TASKFILE}}"' 27 | - 'echo "TASKFILE_DIR: {{.TASKFILE_DIR}}"' 28 | - 'echo "TASK_DIR: {{.TASK_DIR}}"' 29 | - 'echo "USER_WORKING_DIR: {{.USER_WORKING_DIR}}"' 30 | - 'echo "TASK_VERSION: {{.TASK_VERSION}}"' 31 | -------------------------------------------------------------------------------- /website/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/website/static/img/favicon.ico -------------------------------------------------------------------------------- /website/static/img/icon-bluesky.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /website/static/img/icon-discord.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /website/static/img/icon-mastodon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /website/static/img/icon-twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /website/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/website/static/img/logo.png -------------------------------------------------------------------------------- /website/static/img/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/static/img/logo_mono.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/static/img/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/website/static/img/og-image.png -------------------------------------------------------------------------------- /website/static/img/pix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/go-task/task/b932e539d97c0551a09d0fe82e544f5931e52be6/website/static/img/pix.png -------------------------------------------------------------------------------- /website/static/js/carbon.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | function attachAd() { 3 | var wrapper = document.getElementById('sidebar-ads'); 4 | var blogSidebar = document.querySelector('[class*="BlogSidebar"]'); 5 | 6 | if (!wrapper && blogSidebar) { 7 | wrapper = document.createElement('div'); 8 | wrapper.id = 'sidebar-ads'; 9 | blogSidebar.appendChild(wrapper); 10 | } 11 | 12 | if (wrapper) { 13 | var el = document.createElement('script'); 14 | el.setAttribute('type', 'text/javascript'); 15 | el.setAttribute('id', '_carbonads_js'); 16 | el.setAttribute( 17 | 'src', 18 | '//cdn.carbonads.com/carbon.js?serve=CESI65QJ&placement=taskfiledev' 19 | ); 20 | el.setAttribute('async', 'async'); 21 | 22 | wrapper.innerHTML = ''; 23 | wrapper.appendChild(el); 24 | } 25 | } 26 | 27 | setTimeout(function () { 28 | attachAd(); 29 | 30 | var currentPath = window.location.pathname; 31 | 32 | setInterval(function () { 33 | if (currentPath !== window.location.pathname) { 34 | currentPath = window.location.pathname; 35 | attachAd(); 36 | } 37 | }, 1000); 38 | }, 1000); 39 | })(); 40 | -------------------------------------------------------------------------------- /website/static/next-schema-taskrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema", 3 | "title": "Taskrc YAML Schema", 4 | "description": "Schema for .taskrc files.", 5 | "type": "object", 6 | "properties": { 7 | "experiments": { 8 | "type": "object", 9 | "additionalProperties": { 10 | "type": "integer" 11 | } 12 | } 13 | }, 14 | "additionalProperties": false 15 | } 16 | -------------------------------------------------------------------------------- /website/static/schema-taskrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema", 3 | "title": "Taskrc YAML Schema", 4 | "description": "Schema for .taskrc files.", 5 | "type": "object", 6 | "properties": { 7 | "experiments": { 8 | "type": "object", 9 | "additionalProperties": { 10 | "type": "integer" 11 | } 12 | } 13 | }, 14 | "additionalProperties": false 15 | } 16 | -------------------------------------------------------------------------------- /website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@docusaurus/tsconfig", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /website/versioned_docs/version-latest/deprecations/completion_scripts.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | slug: /deprecations/completion-scripts/ 3 | --- 4 | 5 | # Completion Scripts 6 | 7 | :::warning 8 | 9 | This deprecation breaks the following functionality: 10 | 11 | - Any direct references to the completion scripts in the Task git repository 12 | 13 | ::: 14 | 15 | Direct use of the completion scripts in the `completion/*` directory of the 16 | [github.com/go-task/task][task] Git repository is deprecated. Any shell 17 | configuration that directly refers to these scripts will potentially break in 18 | the future as the scripts may be moved or deleted entirely. Any configuration 19 | should be updated to use the [new method for generating shell 20 | completions][completions] instead. 21 | 22 | {/* prettier-ignore-start */} 23 | [completions]: ../installation.mdx#setup-completions 24 | [task]: https://github.com/go-task/task 25 | {/* prettier-ignore-end */} 26 | -------------------------------------------------------------------------------- /website/versioned_docs/version-latest/deprecations/deprecations.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | slug: /deprecations/ 3 | sidebar_position: 8 4 | --- 5 | 6 | # Deprecations 7 | 8 | As Task evolves, it occasionally outgrows some of its functionality. This can be 9 | because they are no longer useful, because another feature has replaced it or 10 | because of a change in the way that Task works internally. 11 | 12 | When this happens, we mark the functionality as deprecated. This means that it 13 | will be removed in a future version of Task. This functionality will continue to 14 | work until that time, but we strongly recommend that you do not implement this 15 | functionality in new Taskfiles and make a plan to migrate away from it as soon 16 | as possible. 17 | 18 | You can view a full list of active deprecations in the "Deprecations" section of 19 | the sidebar. 20 | -------------------------------------------------------------------------------- /website/versioned_docs/version-latest/deprecations/template.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | # This is a template for an experiments documentation 3 | # Copy this page and fill in the details as necessary 4 | title: '--- Template ---' 5 | sidebar_position: -1 # Always push to the top 6 | draft: true # Hide in production 7 | --- 8 | 9 | # \{Name of Deprecated Feature\} (#\{Issue\}) 10 | 11 | :::warning 12 | 13 | This deprecation breaks the following functionality: 14 | 15 | - \{list any existing functionality that will be broken by this deprecation\} 16 | - \{if there are no breaking changes, remove this admonition\} 17 | 18 | ::: 19 | 20 | \{Short description of the feature/behavior and why it is being deprecated\} 21 | 22 | \{Short explanation of any replacement features/behaviors and how users should 23 | migrate to it\} 24 | -------------------------------------------------------------------------------- /website/versioned_docs/version-latest/deprecations/template_functions.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | slug: /deprecations/template-functions/ 3 | --- 4 | 5 | # Template Functions 6 | 7 | :::warning 8 | 9 | This deprecation breaks the following functionality: 10 | 11 | - A small set of templating functions 12 | 13 | ::: 14 | 15 | The following templating functions are deprecated. Any replacement functions are 16 | listed besides the function being removed. 17 | 18 | | Deprecated function | Replaced by | 19 | | ------------------- | ----------- | 20 | | `IsSH` | - | 21 | | `FromSlash` | `fromSlash` | 22 | | `ToSlash` | `toSlash` | 23 | | `ExeExt` | `exeExt` | 24 | -------------------------------------------------------------------------------- /website/versioned_docs/version-latest/experiments/template.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | # This is a template for an experiments documentation 3 | # Copy this page and fill in the details as necessary 4 | title: '--- Template ---' 5 | sidebar_position: -1 # Always push to the top 6 | draft: true # Hide in production 7 | --- 8 | 9 | # \{Name of Experiment\} (#\{Issue\}) 10 | 11 | :::caution 12 | 13 | All experimental features are subject to breaking changes and/or removal _at any 14 | time_. We strongly recommend that you do not use these features in a production 15 | environment. They are intended for testing and feedback only. 16 | 17 | ::: 18 | 19 | :::warning 20 | 21 | This experiment breaks the following functionality: 22 | 23 | - \{list any existing functionality that will be broken by this experiment\} 24 | - \{if there are no breaking changes, remove this admonition\} 25 | 26 | ::: 27 | 28 | :::info 29 | 30 | To enable this experiment, set the environment variable: `TASK_X_{feature}=1`. 31 | Check out [our guide to enabling experiments ][enabling-experiments] for more 32 | information. 33 | 34 | ::: 35 | 36 | \{Short description of the feature\} 37 | 38 | \{Short explanation of how users should migrate to the new behavior\} 39 | 40 | {/* prettier-ignore-start */} 41 | [enabling-experiments]: ./experiments.mdx#enabling-experiments 42 | {/* prettier-ignore-end */} 43 | -------------------------------------------------------------------------------- /website/versioned_docs/version-latest/reference/_category_.yml: -------------------------------------------------------------------------------- 1 | position: 5 2 | label: Reference 3 | -------------------------------------------------------------------------------- /website/versioned_sidebars/version-latest-sidebars.json: -------------------------------------------------------------------------------- 1 | { 2 | "taskSidebar": [ 3 | { 4 | "type": "autogenerated", 5 | "dirName": "." 6 | }, 7 | { 8 | "type": "html", 9 | "value": "
" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /website/versions.json: -------------------------------------------------------------------------------- 1 | [ 2 | "latest" 3 | ] 4 | --------------------------------------------------------------------------------