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
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,9 @@ import ( ...@@ -7,7 +7,9 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"os/exec" "os/exec"
"path/filepath"
"strconv" "strconv"
"strings"
) )
func CDKCompileTypeScript(cdkDir string) error { func CDKCompileTypeScript(cdkDir string) error {
...@@ -223,6 +225,24 @@ func CDKSynthDebug(cdkDir string, env string, handler string, appName string, pr ...@@ -223,6 +225,24 @@ func CDKSynthDebug(cdkDir string, env string, handler string, appName string, pr
return err 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 return nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment