Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
upgrading version to 1.0.3 adding window title
Browse files Browse the repository at this point in the history
  • Loading branch information
mariodivece committed Dec 5, 2016
1 parent c65eefc commit da6c150
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
5 changes: 4 additions & 1 deletion Unosquare.Labs.SshDeploy/DeploymentManager.Monitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Unosquare.Labs.SshDeploy.Options;
using Options;

partial class DeploymentManager
{
Expand Down Expand Up @@ -537,12 +537,15 @@ private static void StartUserInteraction(FileSystemMonitor fsMonitor, SshClient
ForwardShellStreamInput = !ForwardShellStreamInput;
if (ForwardShellStreamInput)
{
Program.Title = "Monitor (Interactive)";
ConsoleManager.WriteLine(" >> Entered console input forwarding.", ConsoleColor.Green);
ForwardShellStreamOutput = true;

//shellStream.Write($"echo \r\n");
}
else
{
Program.Title = "Monitor (Press H for Help)";
ConsoleManager.WriteLine(" >> Left console input forwarding.", ConsoleColor.Red);
}

Expand Down
7 changes: 0 additions & 7 deletions Unosquare.Labs.SshDeploy/DeploymentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ private static void HandleShellEscapeSequence(byte[] escapeSequence)
System.Diagnostics.Debug.WriteLine("Unhandled escape sequence.\r\n Text: {0}\r\n Bytes: {1}",
escapeString, string.Join(" ", escapeSequence.Select(s => s.ToString()).ToArray()));
}

/*
var originalColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.Write(string.Format("{0}", escapeString));
Console.ForegroundColor = originalColor;
*/
}
}
}
Expand Down
25 changes: 21 additions & 4 deletions Unosquare.Labs.SshDeploy/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@

namespace Unosquare.Labs.SshDeploy
{
class Program
static public class Program
{
private static readonly string MutexName = string.Format("Global\\{0}", typeof(Program).Namespace);
static private Mutex AppMutex = null;

static public string Title
{
get { return Console.Title; }
set { Console.Title = value + TitleSuffix; }
}

static public string TitleSuffix { get; set; } = " - SSH Deploy";


static void Main(string[] args)
{
Title = "Unosquare";

#region Handle Single Instance Application

bool isNewMutex;
Expand All @@ -24,9 +35,9 @@ static void Main(string[] args)

#endregion

Console.WriteLine("SSH Deployment Tool [Version " + typeof(Unosquare.Labs.SshDeploy.Program).Assembly.GetName().Version.ToString() + "]");
Console.WriteLine("(c) 2015-2016 Unosquare SA de CV. All Rights Reserved.");
Console.WriteLine("For additional help, please visit https://github.com/unosquare/sshdeploy");
ConsoleManager.WriteLine("SSH Deployment Tool [Version " + typeof(Unosquare.Labs.SshDeploy.Program).Assembly.GetName().Version.ToString() + "]");
ConsoleManager.WriteLine("(c) 2015-2016 Unosquare SA de CV. All Rights Reserved.");
ConsoleManager.WriteLine("For additional help, please visit https://github.com/unosquare/sshdeploy");

var invokedVerbName = string.Empty;
CliVerbOptionsBase invokedVerbOptions = null;
Expand Down Expand Up @@ -54,18 +65,24 @@ static void Main(string[] args)
{
case CliOptions.RunVerb:
{
TitleSuffix = " - Run Mode" + TitleSuffix;
Title = "Command";
var verbOptions = invokedVerbOptions as RunVerbOptions;
DeploymentManager.ExecuteRunVerb(verbOptions);
break;
}
case CliOptions.ShellVerb:
{
TitleSuffix = " - Shell Mode" + TitleSuffix;
Title = "Interactive";
var verbOptions = invokedVerbOptions as ShellVerbOptions;
DeploymentManager.ExecuteShellVerb(verbOptions);
break;
}
case CliOptions.MonitorVerb:
{
TitleSuffix = " - Monitor Mode" + TitleSuffix;
Title = "Monitor";
var verbOptions = invokedVerbOptions as MonitorVerbOptions;
DeploymentManager.ExecuteMonitorVerb(verbOptions);
break;
Expand Down
4 changes: 2 additions & 2 deletions Unosquare.Labs.SshDeploy/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]

0 comments on commit da6c150

Please sign in to comment.