@@ -250,31 +250,6 @@ func SetORYXSettings(config *Config, functionAppName string) error {
250250
251251/* Function to create folders and copy files to the folders */
252252
253- // func CreateFunctionFolders(baseDir string, functions []*common.Function) error {
254- // for i := 0; i < len(functions); i++ {
255- // folderName := fmt.Sprintf("function%d", i)
256- // folderPath := filepath.Join(baseDir, folderName)
257-
258- // // Create the function folder
259- // if err := os.MkdirAll(folderPath, os.ModePerm); err != nil {
260- // return fmt.Errorf("failed to create folder %s: %w", folderPath, err)
261- // }
262-
263- // // Copy azurefunctionsworkload.py, exec_func.py and function.json into each function folder
264- // if err := common.CopyFile("azurefunctions_setup/shared_azure_workload/azurefunctionsworkload.py", filepath.Join(folderPath, "azurefunctionsworkload.py")); err != nil {
265- // return fmt.Errorf("failed to copy azurefunctionsworkload.py to %s: %w", folderPath, err)
266- // }
267- // if err := common.CopyFile("azurefunctions_setup/shared_azure_workload/exec_func.py", filepath.Join(folderPath, "exec_func.py")); err != nil {
268- // return fmt.Errorf("failed to copy exec_func.py to %s: %w", folderPath, err)
269- // }
270- // if err := common.CopyFile("azurefunctions_setup/shared_azure_workload/function.json", filepath.Join(folderPath, "function.json")); err != nil {
271- // return fmt.Errorf("failed to copy function.json to %s: %w", folderPath, err)
272- // }
273- // }
274- // log.Debugf("Created %d function folders with copies of azurefunctionsworkload.py, exec_func.py and function.json under %s folder.\n", len(functions), baseDir)
275- // return nil
276- // }
277-
278253func CreateFunctionFolders (baseDir , sharedWorkloadDir string , functions []* common.Function ) error {
279254 for i := 0 ; i < len (functions ); i ++ {
280255 folderName := fmt .Sprintf ("function%d" , i )
@@ -345,13 +320,7 @@ func DeployFunctions(config *Config, baseDir string, functions []*common.Functio
345320 "--src" , zipFilePath ,
346321 "--build-remote" , "true" )
347322
348- //var stdout, stderr bytes.Buffer // debugging output
349- //cmd.Stdout = &stdout // debugging output
350- //cmd.Stderr = &stderr // debugging output
351-
352323 if err := cmd .Run (); err != nil {
353- //log.Errorf("Deployment stdout:\n%s", stdout.String()) // debugging output
354- //log.Errorf("Deployment stderr:\n%s", stderr.String()) // debugging output
355324 return fmt .Errorf ("failed to deploy %s to function app %s: %w" , zipFilePath , functionAppName , err )
356325 }
357326
0 commit comments