Skip to content

Commit 1c00340

Browse files
authored
Merge pull request #39 from FlowCI/develop
Develop
2 parents 0f3950b + e1cd71b commit 1c00340

25 files changed

+987
-1117
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
2+
*.exe
23
flow-agent-x
34
vendor/
45
.idea/

app.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"github.com/urfave/cli"
2121
)
2222

23-
const version = "0.20.40"
23+
const version = "0.20.45"
2424

2525
func init() {
2626
util.LogInit()
@@ -69,7 +69,7 @@ func main() {
6969

7070
cli.StringFlag{
7171
Name: "workspace, w",
72-
Value: filepath.Join("${HOME}", ".flow.ci.agent"),
72+
Value: filepath.Join(util.HomeDir, ".flow.ci.agent"),
7373
Usage: "Agent working directory",
7474
EnvVar: domain.VarAgentWorkspace,
7575
},
@@ -159,7 +159,7 @@ func printInfo() {
159159
func execCmd(script string) {
160160
cmd := &domain.ShellIn{
161161
ID: "local",
162-
Scripts: []string{script},
162+
Bash: []string{script},
163163
Inputs: domain.Variables{},
164164
Timeout: 1800,
165165
}

domain/cmd_shell.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ type (
1414
AllowFailure bool `json:"allowFailure"`
1515
Plugin string `json:"plugin"`
1616
Dockers []*DockerOption `json:"dockers"`
17-
Scripts []string `json:"scripts"`
17+
Bash []string `json:"bash"`
18+
Pwsh []string `json:"pwsh"`
19+
Retry int `json:"retry"`
1820
Timeout int `json:"timeout"`
1921
Inputs Variables `json:"inputs"`
2022
EnvFilters []string `json:"envFilters"`
@@ -52,14 +54,6 @@ func (in *ShellIn) HasDockerOption() bool {
5254
return in.Dockers != nil && len(in.Dockers) > 0
5355
}
5456

55-
func (in *ShellIn) HasScripts() bool {
56-
if in.Scripts == nil {
57-
return false
58-
}
59-
60-
return len(in.Scripts) != 0
61-
}
62-
6357
func (in *ShellIn) HasEnvFilters() bool {
6458
if in.EnvFilters == nil {
6559
return false

executor/bash.go

Lines changed: 0 additions & 239 deletions
This file was deleted.

0 commit comments

Comments
 (0)