Skip to content

Commit fc6f954

Browse files
committed
Releaser just NugetPush
1 parent 688e162 commit fc6f954

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Releaser/Releaser/Program.cs

+8-4
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ static async Task<int> MainAsync()
7070
Console.WriteLine("Press 1 for Major " + majorVersionNumber.ToString(3));
7171
Console.WriteLine("Press 2 for Minor " + minorVersionNumber.ToString(3));
7272
Console.WriteLine("Press 3 for Patch " + patchVersionNumber.ToString(3));
73+
Console.WriteLine("Press 4 for Nuget repush");
7374
var choice = Console.ReadKey().KeyChar;
7475
Console.WriteLine();
75-
if (choice < '1' || choice > '3')
76+
if (choice < '1' || choice > '4')
7677
{
77-
Console.WriteLine("Not pressed 1, 2 or 3. Exiting.");
78+
Console.WriteLine("Not pressed 1, 2, 3 or 4. Exiting.");
7879
return 1;
7980
}
8081

@@ -113,6 +114,7 @@ static async Task<int> MainAsync()
113114
BuildSourceGenerator(projDir, newVersion, nugetToken);
114115
BuildODbDump(projDir);
115116

117+
if (choice == '4') return 0;
116118
var client = new GitHubClient(new ProductHeaderValue("BTDB-releaser"));
117119
client.SetRequestTimeout(TimeSpan.FromMinutes(15));
118120
var fileNameOfGithubToken =
@@ -156,7 +158,8 @@ static async Task<int> MainAsync()
156158
var uploadAsset = await UploadWithRetry(projDir + "/artifacts/bin/BTDB/Release/", client, release2, "BTDB.zip");
157159
Console.WriteLine("BTDB url:");
158160
Console.WriteLine(uploadAsset.BrowserDownloadUrl);
159-
uploadAsset = await UploadWithRetry(projDir + "/artifacts/bin/ODbDump/Release/", client, release2, "ODbDump.zip");
161+
uploadAsset =
162+
await UploadWithRetry(projDir + "/artifacts/bin/ODbDump/Release/", client, release2, "ODbDump.zip");
160163
Console.WriteLine("ODbDump url:");
161164
Console.WriteLine(uploadAsset.BrowserDownloadUrl);
162165
Console.WriteLine("Press Enter for finish");
@@ -220,7 +223,8 @@ static void Build(string projDir, string newVersion, string nugetToken)
220223
File.Copy(fn, releaseSources + "/" + relfn);
221224
}
222225

223-
System.IO.Compression.ZipFile.CreateFromDirectory(releaseSources, projDir + "/artifacts/bin/BTDB/release/BTDB.zip",
226+
System.IO.Compression.ZipFile.CreateFromDirectory(releaseSources,
227+
projDir + "/artifacts/bin/BTDB/release/BTDB.zip",
224228
System.IO.Compression.CompressionLevel.Optimal, false);
225229
start = new("dotnet", "nuget push BTDB." + newVersion + ".nupkg -s https://nuget.org -k " + nugetToken)
226230
{

0 commit comments

Comments
 (0)