Skip to content

Commit

Permalink
Update default plugin versions (#883)
Browse files Browse the repository at this point in the history
* Update default plugin versions

* Fix plugin's stdin

* Set stderr for plugin runs
  • Loading branch information
godrei committed Aug 8, 2023
1 parent 490dd34 commit d754ded
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bitrise/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ var PluginDependencyMap = map[string]PluginDependency{
},
"step": {
Source: "https://github.com/bitrise-io/bitrise-plugins-step.git",
MinVersion: "0.10.3",
MinVersion: "0.10.4",
},
"workflow-editor": {
Source: "https://github.com/bitrise-io/bitrise-workflow-editor.git",
MinVersion: "1.3.234",
MinVersion: "1.3.241",
},
"analytics": {
Source: "https://github.com/bitrise-io/bitrise-plugins-analytics.git",
MinVersion: "0.13.0",
MinVersion: "0.13.1",
},
}

Expand Down
8 changes: 7 additions & 1 deletion plugins/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package plugins

import (
"bytes"
"os"
"strings"

"github.com/bitrise-io/bitrise/configs"
Expand Down Expand Up @@ -122,7 +123,11 @@ func runPlugin(plugin Plugin, args []string, envKeyValues PluginConfig, input []
cmd = command.New("bash", append([]string{pluginExecutable}, args...)...)
}

cmd.SetStdin(bytes.NewReader(input))
if len(input) > 0 {
cmd.SetStdin(bytes.NewReader(input))
} else {
cmd.SetStdin(os.Stdin)
}

var envs []string
for key, value := range envKeyValues {
Expand All @@ -138,6 +143,7 @@ func runPlugin(plugin Plugin, args []string, envKeyValues PluginConfig, input []
logWriter := logwriter.NewLogWriter(logger)

cmd.SetStdout(logWriter)
cmd.SetStderr(logWriter)

cmdErr := cmd.Run()

Expand Down

0 comments on commit d754ded

Please sign in to comment.