forked from kasthack-labs/kasthack.binding.wf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
77 additions
and
43 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// This is META-file for using ins CI. | ||
|
||
#r "nuget: System.Xml.ReaderWriter" | ||
|
||
using System; | ||
using System.IO; | ||
using System.Xml; | ||
|
||
var versionFilePath = "src/kasthack.binding.wf.csproj"; | ||
var xmlDoc = new XmlDocument(); | ||
xmlDoc.Load(versionFilePath); | ||
|
||
var versionNode = xmlDoc.SelectSingleNode("//Version"); | ||
var currentVersion = versionNode.InnerText; | ||
|
||
var buildNumber = Environment.GetEnvironmentVariable("GITHUB_RUN_NUMBER"); | ||
var newVersion = $"{currentVersion.Split('.')[0]}.{currentVersion.Split('.')[1]}.{buildNumber}"; | ||
|
||
versionNode.InnerText = newVersion; | ||
var assemblyVersionNode = xmlDoc.SelectSingleNode("//AssemblyVersion"); | ||
assemblyVersionNode.InnerText = $"{newVersion}.0"; | ||
|
||
xmlDoc.Save(versionFilePath); | ||
|
||
Console.WriteLine($"Updated version to: {newVersion}"); |
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