Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semi-automates versioning #12

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.