This repository has been archived by the owner on Sep 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from suzuki-shunsuke/docs/add-example-3
docs: add examples
- Loading branch information
Showing
6 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is read from command_file.yaml | ||
# Go's text/teplate | ||
echo "{{.Task.Name}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
phases: | ||
- name: main | ||
tasks: | ||
- name: read command from a file | ||
command: | ||
command_file: command_file.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Tengo script | ||
// Define the variable "result" and this value should be true or false. | ||
result := func(task) { | ||
return task.Name == "when" | ||
}(Task) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
phases: | ||
- name: main | ||
tasks: | ||
- name: "when true" | ||
command: | ||
command: echo "when is always true" | ||
when: true | ||
- name: when | ||
command: | ||
command: echo "use Tengo script in when" | ||
when: | | ||
// Tengo script | ||
// Define the variable "result" and this value should be true or false. | ||
result := func(task) { | ||
return task.Name == "when" | ||
}(Task) | ||
- name: read task.when from a file | ||
command: | ||
command: echo "hello" | ||
when_file: task_when.tengo |
This file was deleted.
Oops, something went wrong.