Merge pull request #6524 from dokku/6490-dos2unix-copy

Ensure all copied files always have line endings converted to unix-style
This commit is contained in:
Jose Diaz-Gonzalez
2024-01-25 00:37:01 -05:00
committed by GitHub
10 changed files with 56 additions and 70 deletions

View File

@@ -5,7 +5,6 @@ go 1.21
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/otiai10/copy v1.14.0
github.com/spf13/pflag v1.0.5
golang.org/x/sync v0.6.0
)
@@ -21,6 +20,7 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/melbahja/goph v1.4.0 // indirect
github.com/otiai10/copy v1.14.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
github.com/ryanuber/columnize v2.1.2+incompatible // indirect

View File

@@ -8,7 +8,6 @@ import (
"strings"
"github.com/dokku/dokku/plugins/common"
"github.com/otiai10/copy"
)
// TriggerAppJSONProcessDeployParallelism returns the max number of processes to deploy in parallel
@@ -120,12 +119,12 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
return common.TouchFile(fmt.Sprintf("%s.missing", processSpecificAppJSON))
}
if err := copy.Copy(repoAppJSONPath, processSpecificAppJSON); err != nil {
if err := common.Copy(repoAppJSONPath, processSpecificAppJSON); err != nil {
return fmt.Errorf("Unable to extract app.json: %v", err.Error())
}
if appJSONPath != "app.json" {
if err := copy.Copy(repoAppJSONPath, repoDefaultAppJSONPath); err != nil {
if err := common.Copy(repoAppJSONPath, repoDefaultAppJSONPath); err != nil {
return fmt.Errorf("Unable to move app.json into place: %v", err.Error())
}
}