daria-malkova commented on a change in pull request #16563:
URL: https://github.com/apache/beam/pull/16563#discussion_r788750936
##########
File path:
playground/backend/internal/setup_tools/life_cycle/life_cycle_setuper.go
##########
@@ -143,3 +152,41 @@ func updateJavaLogConfigFile(paths fs_tool.LifeCyclePaths)
error {
}
return nil
}
+
+func prepareSbtFiles(lc *fs_tool.LifeCycle, pipelineFolder string, workingDir
string) (*fs_tool.LifeCycle, error) {
+ cmd := exec.Command("sh", filepath.Join(workingDir,
"new_scio_project.sh"))
+ cmd.Dir = pipelineFolder
+ _, err := cmd.Output()
+ if err != nil {
+ return nil, err
+ }
+
+ sourceFileFolder := filepath.Join(pipelineFolder, projectPath)
+ fileName := lc.Paths.SourceFileName
+ absFileFolderPath, _ := filepath.Abs(sourceFileFolder)
+ absFilePath, _ := filepath.Abs(filepath.Join(absFileFolderPath,
fileName))
+ absLogFilePath, _ := filepath.Abs(filepath.Join(absFileFolderPath,
logFileName))
+ projectFolder, _ := filepath.Abs(filepath.Join(pipelineFolder,
scioProjectName))
+ executableName := lc.Paths.ExecutableName
+
+ _, err = exec.Command("rm", filepath.Join(absFileFolderPath,
"WordCount.scala")).Output()
Review comment:
There is no need anywhere else for this constant, but I can move it to
constant variab
e
##########
File path:
playground/backend/internal/setup_tools/life_cycle/life_cycle_setuper.go
##########
@@ -143,3 +152,41 @@ func updateJavaLogConfigFile(paths fs_tool.LifeCyclePaths)
error {
}
return nil
}
+
+func prepareSbtFiles(lc *fs_tool.LifeCycle, pipelineFolder string, workingDir
string) (*fs_tool.LifeCycle, error) {
+ cmd := exec.Command("sh", filepath.Join(workingDir,
"new_scio_project.sh"))
+ cmd.Dir = pipelineFolder
+ _, err := cmd.Output()
+ if err != nil {
+ return nil, err
+ }
+
+ sourceFileFolder := filepath.Join(pipelineFolder, projectPath)
+ fileName := lc.Paths.SourceFileName
+ absFileFolderPath, _ := filepath.Abs(sourceFileFolder)
+ absFilePath, _ := filepath.Abs(filepath.Join(absFileFolderPath,
fileName))
+ absLogFilePath, _ := filepath.Abs(filepath.Join(absFileFolderPath,
logFileName))
+ projectFolder, _ := filepath.Abs(filepath.Join(pipelineFolder,
scioProjectName))
+ executableName := lc.Paths.ExecutableName
+
+ _, err = exec.Command("rm", filepath.Join(absFileFolderPath,
"WordCount.scala")).Output()
Review comment:
There is no need anywhere else for this constant, but I can move it to
constant variable
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]