-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In this PR, I added a NuGet package called GitInfo. It can replace Octobot.RepositoryUrl and display the bot version as the current branch and commit. --------- Signed-off-by: mctaylors <[email protected]> Signed-off-by: Macintxsh <[email protected]>
- Loading branch information
Showing
10 changed files
with
75 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
namespace Octobot; | ||
|
||
public static class BuildInfo | ||
{ | ||
public static string RepositoryUrl | ||
{ | ||
get | ||
{ | ||
return ThisAssembly.Git.RepositoryUrl; | ||
} | ||
} | ||
|
||
public static string IssuesUrl | ||
{ | ||
get | ||
{ | ||
return $"{RepositoryUrl}/issues"; | ||
} | ||
} | ||
|
||
private static string Commit | ||
{ | ||
get | ||
{ | ||
return ThisAssembly.Git.Commit; | ||
} | ||
} | ||
|
||
private static string Branch | ||
{ | ||
get | ||
{ | ||
return ThisAssembly.Git.Branch; | ||
} | ||
} | ||
|
||
private static bool IsDirty | ||
{ | ||
get | ||
{ | ||
return ThisAssembly.Git.IsDirty; | ||
} | ||
} | ||
|
||
public static string Version | ||
{ | ||
get | ||
{ | ||
return IsDirty ? $"{Branch}-{Commit}-dirty" : $"{Branch}-{Commit}"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters