Alexander Belanger 4 ani în urmă
părinte
comite
61c54c1c98
2 a modificat fișierele cu 7 adăugiri și 1 ștergeri
  1. 1 1
      cli/cmd/deploy.go
  2. 6 0
      cli/cmd/deploy/deploy.go

+ 1 - 1
cli/cmd/deploy.go

@@ -234,7 +234,7 @@ func init() {
 		"path",
 		"p",
 		".",
-		"If local build, the path to the build directory",
+		"If local build, the path to the build directory. If remote build, the relative path from the repository root to the build directory.",
 	)
 
 	updateCmd.PersistentFlags().StringVarP(

+ 6 - 0
cli/cmd/deploy/deploy.go

@@ -218,6 +218,12 @@ func (d *DeployAgent) Build() error {
 		if err != nil {
 			return err
 		}
+
+		// if the local path is set it must be a relative path, so create a filepath with the dst
+		// and the relative path
+		if d.opts.LocalPath != "" {
+			dst = filepath.Join(dst, d.opts.LocalPath)
+		}
 	} else {
 		dst = filepath.Dir(d.opts.LocalPath)
 	}