Skip to content

Commit

Permalink
Merge pull request #13 from russel-io/fixBug
Browse files Browse the repository at this point in the history
add version and tip
  • Loading branch information
SaeedSafi1999 authored Aug 28, 2024
2 parents c600892 + f9fe149 commit a16c133
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion russel-cli/Commandhandlers/CommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ private static void PrintHelp()
"Commands:".WriteInfo();
"add_profile [userName] [password] to set new profile".WriteInfo();
"logout for logout in russel".WriteInfo();
"set [cluster name] [key] [value] - Set value for key in cluster".WriteInfo();
"set [cluster name] [key] - Set value for key in cluster".WriteInfo();
"TIP => ttl can be null in set but value can not be null or empty".WriteTip();
"set [cluster name] [key] [value] [ttl in millisecond] - Set value for key with time life in cluster".WriteInfo();
"set_cluster [cluster name] - Set a new cluster".WriteInfo();
"get [cluster name] [key] - Get value for key in cluster".WriteInfo();
Expand Down
14 changes: 14 additions & 0 deletions russel-cli/Helpers/ConsoleWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ public static void WriteInfo(this string text)
Console.ResetColor();
}

public static void WriteTip(this string text)
{
Console.ForegroundColor = ConsoleColor.Magenta;
Console.WriteLine(text);
Console.ResetColor();
}

public static void WriteTipInLine(this string text)
{
Console.ForegroundColor = ConsoleColor.Magenta;
Console.Write(text);
Console.ResetColor();
}

public static void WriteInfoInLine(this string text)
{
Console.ForegroundColor = ConsoleColor.DarkYellow;
Expand Down
3 changes: 2 additions & 1 deletion russel-cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Russel_CLI.Settings;
using System.Text.Json;
using RestSharp;
using System.Reflection;

public class Program
{
Expand Down Expand Up @@ -40,7 +41,7 @@ public static void PrintRussel()
Console.WriteLine(" || // // // // / // / // // // ||");
Console.WriteLine(" || // // //////// ///////// ///////// ///////// ///////// ||");
Console.WriteLine(" |============================================================================|");
Console.WriteLine(" VERSION 0.1.0" +
Console.WriteLine($" VERSION {Assembly.GetExecutingAssembly().GetName().Version}" +
"");
Console.WriteLine("======================================= FOR CHECKING CONNECTION TYPE [ping] ============================================");

Expand Down
3 changes: 3 additions & 0 deletions russel-cli/russel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<Version>0.1.0</Version>
<AssemblyVersion>0.1.0</AssemblyVersion>
<FileVersion>0.1.0</FileVersion>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down

0 comments on commit a16c133

Please sign in to comment.