Skip to content

Commit

Permalink
✨ [Feat] index.ts file 접근 위치 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
김혜진 authored and 김혜진 committed Sep 20, 2024
1 parent 190bf0f commit 11b9d57
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public ResponseEntity<CustomApiResponse<?>> createReport(Long repoId) {
scriptPath = "/Users/gimhyejin/Library/CloudStorage/OneDrive-한성대학교/문서/Projects/PND-Server/src/main/resources/scripts/3d-contrib/src/index.ts";
} else {
// Deploy path for EC2 (Linux)
scriptPath = "/home/ubuntu/PND-Server/src/main/resources/scripts/3d-contrib/src/index.ts";
System.out.println("Current working directory: " + Paths.get("").toAbsolutePath().toString());
scriptPath = "../../src/main/resources/scripts/3d-contrib/src/index.ts";
}

ProcessBuilder processBuilder = new ProcessBuilder("ts-node", scriptPath);
Expand Down Expand Up @@ -136,13 +137,14 @@ public ResponseEntity<CustomApiResponse<?>> createReport(Long repoId) {
String outputPath;
if (os.contains("win")) {
// Windows path
outputPath = "./src/main/resources/scripts/3d-contrib/src/index.ts";
outputPath = "./src/main/resources/profile-3d-contrib/" + svgFileName;
} else if (os.contains("mac")) {
// macOS path
outputPath = "/Users/gimhyejin/Library/CloudStorage/OneDrive-한성대학교/문서/Projects/PND-Server/src/main/resources/profile-3d-contrib/" + svgFileName;
} else {
// Deploy path for EC2 (Linux)
outputPath = "/home/ubuntu/PND-Server/src/main/resources/profile-3d-contrib/" + svgFileName;
outputPath = "../../src/main/resources/profile-3d-contrib/" + svgFileName;

}

File file = new File(outputPath);
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/scripts/3d-contrib/src/file-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ let OUTPUT_FOLDER: string;

if (os.platform() === 'win32') {
// Windows path
OUTPUT_FOLDER = "./src/main/resources/scripts/3d-contrib/src/index.ts";
OUTPUT_FOLDER = './src/main/resources/profile-3d-contrib';
} else if (os.platform() === 'darwin') {
// macOS path
OUTPUT_FOLDER = '/Users/gimhyejin/Library/CloudStorage/OneDrive-한성대학교/문서/Projects/PND-Server/src/main/resources/profile-3d-contrib';
} else {
// Deploy path for EC2 (Linux)
OUTPUT_FOLDER = '/home/ubuntu/PND-Server/src/main/resources/profile-3d-contrib';
OUTPUT_FOLDER = '../../src/main/resources/profile-3d-contrib';
}

export { OUTPUT_FOLDER };
Expand Down
Loading

0 comments on commit 11b9d57

Please sign in to comment.