Skip to content

Commit f430f9c

Browse files
committed
patch tarball rel paths
1 parent c18c3cf commit f430f9c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

commands/cloud_deploy.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (d *KoolDeploy) createReleaseFile() (filename string, err error) {
223223
}
224224

225225
if len(allFiles) == 0 {
226-
err = fmt.Errorf("no deploy config files found")
226+
err = fmt.Errorf("no kool.cloud.yml config files found")
227227
return
228228
}
229229

@@ -238,6 +238,8 @@ func (d *KoolDeploy) createReleaseFile() (filename string, err error) {
238238
d.shell.Println(" -", file)
239239
}
240240

241+
tarball.SourceDir(d.env.Get("PWD"))
242+
241243
filename, err = tarball.CompressFiles(d.handleDeployEnv(allFiles))
242244

243245
if err == nil {

services/tgz/tgz.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ func (tgz *TarGz) CompressFiles(files []string) (tmpfile string, err error) {
6262
return
6363
}
6464

65+
// SourceDir defines the source directory that is going to be compressed
66+
func (tgz *TarGz) SourceDir(dir string) {
67+
tgz.sourceDir = dir
68+
}
69+
6570
// CompressFolder adds the given folder to the tarball archive
6671
func (tgz *TarGz) CompressFolder(dir string) (tmpfile string, err error) {
6772
tgz.sourceDir = dir

0 commit comments

Comments
 (0)