Skip to content

Commit

Permalink
Merge pull request #12 from valadas/versioning
Browse files Browse the repository at this point in the history
Semi-automates versioning
  • Loading branch information
valadas authored Aug 12, 2021
2 parents ce28ae4 + 4f04f73 commit 4891bc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Build-Release.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
param (
[Parameter(Mandatory=$true)]
[Parameter(Mandatory=$false)]
[ValidatePattern("^\d+\.\d+\.(?:\d+\.\d+$|\d+$)")]
[string]
$ReleaseVersionNumber,
[Parameter(Mandatory=$true)]
[Parameter(Mandatory=$false)]
[string]
[AllowEmptyString()]
$PreReleaseName,
Expand All @@ -12,6 +12,11 @@ param (
$IsBuildServer = 0
)

if ([string]::IsNullOrEmpty($ReleaseVersionNumber)) {
$tags = git tag --sort=-creatordate
$ReleaseVersionNumber = $tags[0].Substring(1);
}

$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName
$RepoRoot = (get-item $PSScriptFilePath).Directory.FullName;
$SolutionRoot = Join-Path -Path $RepoRoot -ChildPath "src";
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ Shows information about all CDF releases
© 2018 by Shannon Deminick

This is free software and is licensed under the [Microsoft Public License (Ms-PL)](http://opensource.org/licenses/MS-PL)

## Build/Release process
To build the DNN specific library, run `./Build-Release.ps1` in powershell. The default configuration will use the version from the most recent git tag only if a specific version is not provided manually to the script.

0 comments on commit 4891bc4

Please sign in to comment.