Skip to content

Commit

Permalink
patch tarball rel paths
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriciojs committed Jan 13, 2024
1 parent c18c3cf commit f430f9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion commands/cloud_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (d *KoolDeploy) createReleaseFile() (filename string, err error) {
}

if len(allFiles) == 0 {
err = fmt.Errorf("no deploy config files found")
err = fmt.Errorf("no kool.cloud.yml config files found")
return
}

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

tarball.SourceDir(d.env.Get("PWD"))

filename, err = tarball.CompressFiles(d.handleDeployEnv(allFiles))

if err == nil {
Expand Down
5 changes: 5 additions & 0 deletions services/tgz/tgz.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ func (tgz *TarGz) CompressFiles(files []string) (tmpfile string, err error) {
return
}

// SourceDir defines the source directory that is going to be compressed
func (tgz *TarGz) SourceDir(dir string) {
tgz.sourceDir = dir
}

// CompressFolder adds the given folder to the tarball archive
func (tgz *TarGz) CompressFolder(dir string) (tmpfile string, err error) {
tgz.sourceDir = dir
Expand Down

0 comments on commit f430f9c

Please sign in to comment.