Skip to content

Commit b31f6c5

Browse files
Merge pull request #9 from NeilMacMullen/bump-version
Bump version to 1.2.0
2 parents 181a913 + dccf558 commit b31f6c5

File tree

13 files changed

+74
-28
lines changed

13 files changed

+74
-28
lines changed

Core/Extensions/StringExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ public static string[] Tokenise(this string str) => str.Split(' ',
1212

1313
public static string WinSlash(this string str) => str.Replace("/", @"\");
1414
public static string UnixSlash(this string str) => str.Replace(@"\", "/");
15+
16+
public static bool EqualsCI(this string str, string other)
17+
=> str.Equals(other, StringComparison.InvariantCultureIgnoreCase);
1518
}
1619
}

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,18 @@ If you like, or are using this project please give it a star - thanks!
1010

1111
## What's new?
1212

13-
### vNext (source only)
14-
- Implemented 'remove'
13+
### v1.2.0
14+
- Implemented 'remove' functionality
1515
- powershell and bash modules now better organised
1616
- better handling for missing bookmarks
1717
- If you pass an actual path instead of a bookmark, jumpfs now does the "right thing" in most cases.
1818
- Bookmarks can be exposed via [virtual drive](doc/psdrive.md) (Powershell 7 only)
1919
- It is now possible to bookmark Urls and shell commands
2020

21-
### v1.1.0
22-
First public release package
23-
21+
See [full revision history](doc/revisionHistory.md)
2422
<hr/>
2523

26-
27-
**jumpfs** is a simple cross-platform exe and collection of scripts that allow you bookmark locations in your file system, jump between them, or open them in explorer or VS Code. You can also "bookmark" Urls and commands
28-
29-
24+
**jumpfs** is a simple cross-platform exe and collection of scripts that allow you bookmark locations in your file system, jump between them, or open them in explorer or VS Code. You can also "bookmark" Urls and shell commands.
3025

3126
It's easiest to demonstrate with a picture..
3227

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Remove-Item publish\* -Recurse -Force
33
dotnet publish -p:PublishProfile=linux
44
dotnet publish -p:PublishProfile=windows
55

6-
Remove-Item publish\*.pdb
6+
Remove-Item publish\*.pdb -Recurse
77

88
Copy-Item scripts\bash\*.sh publish
99
Copy-Item scripts\powershell\*.ps* publish

doc/revisionHistory.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Change log
2+
3+
# v1.2.0
4+
- Implemented 'remove'
5+
- powershell and bash modules now better organised
6+
- better handling for missing bookmarks
7+
- If you pass an actual path instead of a bookmark, jumpfs now does the "right thing" in most cases.
8+
- Bookmarks can be exposed via [virtual drive](doc/psdrive.md) (Powershell 7 only)
9+
- It is now possible to bookmark Urls and shell commands
10+
11+
See [full revision history](doc/revisionHistory.md)
12+
13+
# v1.1.0
14+
- Initial public release

jumpfs/CommandLineParsing/CommandDescriptor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public readonly struct CommandDescriptor
2525
/// </summary>
2626
public readonly ArgumentDescriptor[] Arguments;
2727

28-
public CommandDescriptor(Action<ParseResults, ApplicationContext> action, string name,
28+
private CommandDescriptor(Action<ParseResults, ApplicationContext> action, string name,
2929
ArgumentDescriptor[] arguments,
3030
string helpText)
3131
{
@@ -53,7 +53,7 @@ public CommandDescriptor WithHelpText(string helpText) =>
5353

5454
public bool TryArgument(string name, out ArgumentDescriptor arg)
5555
{
56-
return Arguments.TryGetSingle(a => a.Name == name, out arg);
56+
return Arguments.TryGetSingle(a => a.Name.EqualsCI(name), out arg);
5757
}
5858
}
5959
}

jumpfs/CommandLineParsing/CommandLineParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public ParseResults Parse(string[] suppliedArguments)
3535
if (!suppliedArguments.Any())
3636
return ParseResults.Error(CommandDescriptor.Empty, ConstructHelp());
3737

38-
if (!_commands.TryGetSingle(c => c.Name == suppliedArguments[0], out var requestedCommand))
38+
if (!_commands.TryGetSingle(c => c.Name.EqualsCI(suppliedArguments[0]), out var requestedCommand))
3939
return ParseResults.Error(CommandDescriptor.Empty, ConstructHelp());
4040

4141
bool IsValue(int i) => i < suppliedArguments.Length && !suppliedArguments[i].StartsWith(CommandPrefix);

jumpfs/Commands/CmdCheckVersion.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using jumpfs.CommandLineParsing;
2+
3+
namespace jumpfs.Commands
4+
{
5+
public class CmdCheckVersion
6+
{
7+
public static readonly CommandDescriptor Descriptor =
8+
new CommandDescriptor(Run, "checkVersion")
9+
.WithArguments(
10+
ArgumentDescriptor.CreateSwitch("quiet")
11+
)
12+
.WithHelpText("checks for a new version");
13+
14+
private static void Run(ParseResults results, ApplicationContext context)
15+
{
16+
var quiet = results.ValueOf<bool>(Names.Quiet);
17+
UpgradeManager.CheckAndWarnOfNewVersion(context.OutputStream, quiet);
18+
}
19+
}
20+
}

jumpfs/Commands/CmdInfo.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,7 @@ private static void Run(ParseResults results, ApplicationContext context)
3333

3434

3535
context.WriteLine("Checking for new version...");
36-
var t = UpgradeManager.GetLatestVersion();
37-
t.Wait();
38-
var latestVersion = t.Result;
39-
context.WriteLine(
40-
latestVersion.Supersedes(GitVersionInformation.SemVer)
41-
? @$"
42-
An Upgrade to version {latestVersion.Version} is available.
43-
Please visit {UpgradeManager.ReleaseSite} for download.
44-
"
45-
: @"
46-
You are running the latest version."
47-
);
36+
UpgradeManager.CheckAndWarnOfNewVersion(context.OutputStream, false);
4837
}
4938
}
5039
}

jumpfs/Commands/GitVersionInformation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{
33
public static class GitVersionInformation
44
{
5-
public const string SemVer = "1.1.0";
5+
public const string SemVer = "1.2.0";
66
}
77
}

jumpfs/Commands/JumpFs.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public static CommandLineParser CreateParser()
1616
CmdMark.Descriptor,
1717
CmdFind.Descriptor,
1818
CmdList.Descriptor,
19-
CmdRemove.Descriptor
19+
CmdRemove.Descriptor,
20+
CmdCheckVersion.Descriptor
2021
);
2122
return parser;
2223
}

0 commit comments

Comments
 (0)