Skip to content

Commit dcbb867

Browse files
committed
VersionBump : v4.3.3
1 parent 9449bbe commit dcbb867

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

src/CodeOfChaos.CliArgsParser.Generators/CodeOfChaos.CliArgsParser.Generators.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<!-- Main package name -->
1313
<PackageId>CodeOfChaos.CliArgsParser.Generators</PackageId>
14-
<Version>4.3.2</Version>
14+
<Version>4.3.3</Version>
1515
<Authors>Anna Sas</Authors>
1616
<Description>CliArgsParser is a library built around Dependency Injection to allow you to create CLI tools with ease</Description>
1717
<PackageProjectUrl>https://github.com/code-of-chaos/cs-code_of_chaos-cli_args_parser/</PackageProjectUrl>

src/CodeOfChaos.CliArgsParser.Library/CodeOfChaos.CliArgsParser.Library.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<!-- Main package name -->
1010
<PackageId>CodeOfChaos.CliArgsParser.Library</PackageId>
11-
<Version>4.3.2</Version>
11+
<Version>4.3.3</Version>
1212
<Authors>Anna Sas</Authors>
1313
<Description>CliArgsParser is a library built around Dependency Injection to allow you to create CLI tools with ease</Description>
1414
<PackageProjectUrl>https://github.com/code-of-chaos/cs-code_of_chaos-cli_args_parser/</PackageProjectUrl>

src/CodeOfChaos.CliArgsParser.Library/Commands/VersionBump/VersionBumpCommand.cs

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ public async Task ExecuteAsync(VersionBumpParameters parameters) {
5757
Console.WriteLine(errorPushing);
5858
return;
5959
}
60+
61+
SuccessOrFailure pushTagsResult = await GitHelpers.TryPushTagsToOrigin();
62+
if (pushTagsResult is { IsFailure: true, AsFailure.Value: var errorPushingTags }) {
63+
Console.WriteLine(errorPushingTags);
64+
return;
65+
}
6066

6167
Console.WriteLine("Pushed to origin successfully.");
6268
}

src/CodeOfChaos.CliArgsParser.Library/Shared/GitHelpers.cs

+18
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,24 @@ public static async Task<SuccessOrFailure> TryPushToOrigin() {
2424

2525
return new Success();
2626
}
27+
28+
29+
public static async Task<SuccessOrFailure> TryPushTagsToOrigin() {
30+
var gitTagInfo = new ProcessStartInfo("git", "push origin --tags") {
31+
RedirectStandardOutput = true,
32+
UseShellExecute = false,
33+
CreateNoWindow = true
34+
};
35+
36+
using Process? gitTagProcess = Process.Start(gitTagInfo);
37+
Console.WriteLine(await gitTagProcess?.StandardOutput.ReadToEndAsync()!);
38+
await gitTagProcess.WaitForExitAsync();
39+
40+
if (gitTagProcess.ExitCode != 0) return "Pushing Tags to origin failed";
41+
42+
return new Success();
43+
}
44+
2745

2846
public static async Task<SuccessOrFailure> TryCreateGitTag(SemanticVersionDto updatedVersion) {
2947
var gitTagInfo = new ProcessStartInfo("git", "tag v" + updatedVersion) {

src/CodeOfChaos.CliArgsParser/CodeOfChaos.CliArgsParser.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<!-- Main package name -->
99
<PackageId>CodeOfChaos.CliArgsParser</PackageId>
10-
<Version>4.3.2</Version>
10+
<Version>4.3.3</Version>
1111
<Authors>Anna Sas</Authors>
1212
<Description>CliArgsParser is a library built around Dependency Injection to allow you to create CLI tools with ease</Description>
1313
<PackageProjectUrl>https://github.com/code-of-chaos/cs-code_of_chaos-cli_args_parser/</PackageProjectUrl>

0 commit comments

Comments
 (0)