Skip to content

Commit b5b3798

Browse files
committed
Bugfixes
1 parent 2b259f1 commit b5b3798

8 files changed

Lines changed: 30 additions & 11 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ jobs:
3333
$version = "${{ github.ref }}"
3434
$version = $version.Substring(10)
3535
echo "::set-env name=RELEASE_TAG::$version"
36-
dotnet publish -c Release -r win-x86 -o ./publish/x86 -p:ReleaseTag=$version
37-
dotnet publish -c Release -r win-x64 -o ./publish/x64 -p:ReleaseTag=$version
38-
Compress-Archive -Path ./publish/* -DestinationPath ./publish/win.zip -CompressionLevel Optimal
36+
dotnet publish -c Release -r win-x86 -o ./publish/win/x86 -p:ReleaseTag=$version
37+
dotnet publish -c Release -r win-x64 -o ./publish/win/x64 -p:ReleaseTag=$version
38+
Compress-Archive -Path ./publish/win -DestinationPath ./publish/win.zip -CompressionLevel Optimal
39+
dotnet publish -c Release -o ./publish/any -p:ReleaseTag=$version
40+
Compress-Archive -Path ./publish/any -DestinationPath ./publish/any.zip -CompressionLevel Optimal
3941
- name: Create Release
4042
id: create_release
4143
uses: actions/create-release@v1.0.0
@@ -46,8 +48,8 @@ jobs:
4648
release_name: Release ${{ github.ref }}
4749
draft: false
4850
prerelease: false
49-
- name: Upload Release Asset
50-
id: upload-release-asset
51+
- name: Upload Release Asset (win)
52+
id: upload-release-asset-win
5153
uses: actions/upload-release-asset@v1.0.1
5254
env:
5355
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -56,3 +58,13 @@ jobs:
5658
asset_path: ./publish/win.zip
5759
asset_name: CSharpScriptRunner-${{ env.RELEASE_TAG }}-win.zip
5860
asset_content_type: application/zip
61+
- name: Upload Release Asset (any)
62+
id: upload-release-asset-any
63+
uses: actions/upload-release-asset@v1.0.1
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
with:
67+
upload_url: ${{ steps.create_release.outputs.upload_url }}
68+
asset_path: ./publish/any.zip
69+
asset_name: CSharpScriptRunner-${{ env.RELEASE_TAG }}-any.zip
70+
asset_content_type: application/zip

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
bin
22
obj
3-
publish/x64
4-
publish/x86
3+
publish/win/x64
4+
publish/win/x86
5+
publish/any/any
56
.vscode

Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ static void Main(string[] args)
7272

7373
static void PrintHelp()
7474
{
75+
var newRelease = Updates.CheckForNewRelease().Result;
76+
if (newRelease != default)
77+
Console.WriteLine($"A new release of {nameof(CSharpScriptRunner)} ({newRelease.Version}) is available at {newRelease.Url}");
78+
7579
var exe = nameof(CSharpScriptRunner);
7680
Console.WriteLine($"Alias: {CmdAlias}");
7781
Console.WriteLine($"{exe} ScriptFilePath [args]");

Templates/Script.csx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static class Script
7979

8080
public static IDictionary<string, string> ParseArguments(IEnumerable<string> args)
8181
{
82-
var arguments = new Dictionary<string, string>();
82+
var arguments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
8383
string key = null;
8484
foreach (var value in args)
8585
{

Templates/ScriptUI.csx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static class Script
104104

105105
public static IDictionary<string, string> ParseArguments(IEnumerable<string> args)
106106
{
107-
var arguments = new Dictionary<string, string>();
107+
var arguments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
108108
string key = null;
109109
foreach (var value in args)
110110
{

publish.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
dotnet publish -c Release -r win-x86 -o publish\x86 -p:ReleaseTag=dev
2-
dotnet publish -c Release -r win-x64 -o publish\x64 -p:ReleaseTag=dev
1+
dotnet publish -c Release -r win-x86 -o publish/win/x86 -p:ReleaseTag=dev
2+
dotnet publish -c Release -r win-x64 -o publish/win/x64 -p:ReleaseTag=dev
3+
dotnet publish -c Release -o publish/any/any -p:ReleaseTag=dev

publish/any/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Requires .NET Core 3.1 (or later) Runtime: https://docs.microsoft.com/en-us/dotnet/core/install/runtime

0 commit comments

Comments
 (0)