Skip to content

Commit e93bd85

Browse files
authored
Merge pull request #2761 from jackwilsdon/move-is-dependency
docs: move is_dependency to correct function group
2 parents b1b1d2b + 926b3e2 commit e93bd85

File tree

12 files changed

+40
-17
lines changed

12 files changed

+40
-17
lines changed

docs/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,10 @@ cd ../ # main project directory
4747

4848
go run ./docs/hack/config/schemas/main.go
4949
```
50+
51+
### Generate Function Docs
52+
```bash
53+
cd ../ # main project directory
54+
55+
go run ./docs/hack/functions/main.go
56+
```

docs/hack/functions/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ var Functions = []Function{
315315
Handler: commands.IsDependency,
316316
Return: reflect.Int.String(),
317317
Group: groupChecks,
318-
IsGlobal: true,
319318
},
320319
{
321320
Name: "is_empty",
@@ -335,6 +334,15 @@ var Functions = []Function{
335334
Group: groupChecks,
336335
IsGlobal: true,
337336
},
337+
{
338+
Name: "is_in",
339+
Description: "Returns exit code 0 if the value of the first argument can be found in the second argument (second argument being a blank-separated list of strings e.g `\"bananas apples peaches\"`)",
340+
Args: `[value-1] [value-2]`,
341+
Handler: basiccommands.IsIn,
342+
Return: reflect.Int.String(),
343+
Group: groupChecks,
344+
IsGlobal: true,
345+
},
338346
{
339347
Name: "is_os",
340348
Description: `Returns exit code 0 if the current operating system equals the value provided as argument`,

docs/pages/configuration/_partials/functions/group_checks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
import PartialIstrue from "./is_true.mdx"
66
import PartialIsos from "./is_os.mdx"
7+
import PartialIsin from "./is_in.mdx"
78
import PartialIsequal from "./is_equal.mdx"
89
import PartialIsempty from "./is_empty.mdx"
910
import PartialIsdependency from "./is_dependency.mdx"
10-
import PartialIsin from "./is_in.mdx"
1111

1212
<PartialIsdependency />
1313
<PartialIsempty />

docs/pages/configuration/_partials/functions/group_checks_global.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44

55
import PartialIstrue from "./is_true.mdx"
66
import PartialIsos from "./is_os.mdx"
7+
import PartialIsin from "./is_in.mdx"
78
import PartialIsequal from "./is_equal.mdx"
89
import PartialIsempty from "./is_empty.mdx"
9-
import PartialIsdependency from "./is_dependency.mdx"
10-
import PartialIsin from "./is_in.mdx"
1110

12-
<PartialIsdependency />
1311
<PartialIsempty />
1412
<PartialIsequal />
1513
<PartialIsin />
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div className="group" data-group="checks_pipeline">
2+
<div className="group-name">Checks</div>
3+
4+
5+
import PartialIsdependency from "./is_dependency.mdx"
6+
7+
<PartialIsdependency />
8+
9+
</div>

docs/pages/configuration/_partials/functions/is_dependency.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<details className="config-field -function" data-expandable="false">
44
<summary>
55

6-
### `is_dependency` <span className="config-field-type"></span> <span className="config-field-enum"></span> <span className="config-field-default -return">bool</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_dependency}
6+
### `is_dependency` <span className="config-field-type"></span> <span className="config-field-enum"></span> <span className="config-field-default -return">int</span> <span className="config-field-required" data-required="true">pipeline only</span> {#is_dependency}
77

8-
Returns true if the pipeline currently being executed is run because the project is a dependency of another project
8+
Returns exit code 0 if the pipeline currently being executed is run because the project is a dependency of another project
99

1010
</summary>
1111

docs/pages/configuration/_partials/functions/is_empty.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<details className="config-field -function" data-expandable="false">
44
<summary>
55

6-
### `is_empty` <span className="config-field-type">[value]</span> <span className="config-field-enum"></span> <span className="config-field-default -return">bool</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_empty}
6+
### `is_empty` <span className="config-field-type">[value]</span> <span className="config-field-enum"></span> <span className="config-field-default -return">int</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_empty}
77

8-
Returns true if the value of the argument is empty string
8+
Returns exit code 0 if the value of the argument is empty string
99

1010
</summary>
1111

docs/pages/configuration/_partials/functions/is_equal.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<details className="config-field -function" data-expandable="false">
44
<summary>
55

6-
### `is_equal` <span className="config-field-type">[value-1] [value-2]</span> <span className="config-field-enum"></span> <span className="config-field-default -return">bool</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_equal}
6+
### `is_equal` <span className="config-field-type">[value-1] [value-2]</span> <span className="config-field-enum"></span> <span className="config-field-default -return">int</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_equal}
77

8-
Returns true if the values of both arguments provided are equal
8+
Returns exit code 0 if the values of both arguments provided are equal
99

1010
</summary>
1111

docs/pages/configuration/_partials/functions/is_in.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<details className="config-field -function" data-expandable="false">
44
<summary>
55

6-
### `is_in` <span className="config-field-type">[value-1] [value-2]</span> <span className="config-field-enum"></span> <span className="config-field-default -return">bool</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_in}
6+
### `is_in` <span className="config-field-type">[value-1] [value-2]</span> <span className="config-field-enum"></span> <span className="config-field-default -return">int</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_in}
77

8-
Returns true if value of the first argument can be found in the second argument (second argument beeing a blank-separated list of strings e.g `"bananas apples peaches"`)
8+
Returns exit code 0 if the value of the first argument can be found in the second argument (second argument being a blank-separated list of strings e.g `"bananas apples peaches"`)
99

1010
</summary>
1111

docs/pages/configuration/_partials/functions/is_os.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<details className="config-field -function" data-expandable="false">
44
<summary>
55

6-
### `is_os` <span className="config-field-type">[os]</span> <span className="config-field-enum"><span>darwin linux windows aix android dragonfly freebsd hurd illumos ios js nacl netbsd openbsd plan9 solaris zos</span></span> <span className="config-field-default -return">bool</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_os}
6+
### `is_os` <span className="config-field-type">[os]</span> <span className="config-field-enum"><span>darwin linux windows aix android dragonfly freebsd hurd illumos ios js nacl netbsd openbsd plan9 solaris zos</span></span> <span className="config-field-default -return">int</span> <span className="config-field-required" data-required="false">pipeline only</span> {#is_os}
77

8-
Returns true if the current operating system equals the value provided as argument
8+
Returns exit code 0 if the current operating system equals the value provided as argument
99

1010
</summary>
1111

0 commit comments

Comments
 (0)