Skip to content
Snippets Groups Projects
Commit f133e9d9 authored by Johan de Klerk's avatar Johan de Klerk
Browse files

Copy nested stack to handler folder

parent 96ceb686
Branches
Tags v0.12.0
No related merge requests found
......@@ -7,7 +7,9 @@ import (
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
)
func CDKCompileTypeScript(cdkDir string) error {
......@@ -223,6 +225,24 @@ func CDKSynthDebug(cdkDir string, env string, handler string, appName string, pr
return err
}
// Copy nested stack to handler_api folder
err = filepath.Walk(cdkDir+"/cdk.out/", func(path string, info os.FileInfo, err error) error {
if strings.Contains(path, "nested.template.json") {
filename := filepath.Base(path)
err := Copy(path, "./core/"+handler+"/"+filename)
if err != nil {
return err
}
}
return nil
})
if err != nil {
return err
}
return nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment