private void FillWithDefaults(string user, ProjectMetadata metadata, CustomizableSettings customizableSettings) { customizableSettings.Host = "hostname"; customizableSettings.DestinationPath = $"/home/{user ?? "[USER]"}/DotNetApps/{metadata.ProjectName}"; customizableSettings.Display = ":0.0"; customizableSettings.RunAfterDeployment = true; customizableSettings.AssemblyName = metadata.AssemblyName; customizableSettings.Framework = metadata.Frameworks.First(); }
public DeploymentProfile Configure(string profileName, ProjectMetadata metadata, string username, DeploymentProfile profile = null) { if (profile != null) { UpdateExisting(profileName, profile); } else { profile = CreateNew(profileName, username, metadata); } return(profile); }
private DeploymentProfile CreateNew(string profileName, string username, ProjectMetadata metadata) { Console.WriteLine(Resources.CreatingProfile, profileName); Console.WriteLine(Resources.InformationPrompt); var settings = new CustomizableSettings(); var profile = new DeploymentProfile(profileName, settings); if (string.IsNullOrWhiteSpace(username)) { username = PromptRemoteUsername(); } FillWithDefaults(username, metadata, settings); Fill(settings); return(profile); }