Skip to content

Commit 08aebc9

Browse files
committed
add launch profiles to connect to dev or prod object service
1 parent cf75a80 commit 08aebc9

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

AvaGui/Models/ObjectEditorModel.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ public class ObjectEditorModel
5454

5555
public static string SettingsPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), ApplicationName);
5656

57-
#if DEBUG
58-
public static string SettingsFile => Path.Combine(SettingsPath, "settings-dev.json");
59-
#else
60-
public static string SettingsFile => Path.Combine(SettingsPath, "settings.json");
61-
#endif
57+
public static string SettingsFile => Path.Combine(SettingsPath, Environment.GetEnvironmentVariable("ENV_SETTINGS_FILE")!); // "settings-dev.json" for dev, "settings.json" for prod
6258

6359
public ObservableCollection<LogLine> LoggerObservableLogs = [];
6460

AvaGui/Properties/launchSettings.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@
44
"commandName": "WSL2",
55
"distributionName": "Ubuntu-24.04"
66
},
7-
"AvaGui": {
8-
"commandName": "Project"
7+
"AvaGuiDevService": {
8+
"commandName": "Project",
9+
"environmentVariables": {
10+
"ENV_SETTINGS_FILE": "settings-dev.json"
11+
}
12+
},
13+
"AvaGuiProdService": {
14+
"commandName": "Project",
15+
"environmentVariables": {
16+
"ENV_SETTINGS_FILE": "settings.json"
17+
}
918
}
1019
}
11-
}
20+
}

0 commit comments

Comments
 (0)