Skip to content

Commit

Permalink
Update GitVersion utility to dotnet-gitversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxhy committed Jan 25, 2025
1 parent 8e06167 commit 77b48ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sources/LibLogicalAccessNet/LibLogicalAccessNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<RootNamespace>LibLogicalAccess</RootNamespace>
<Description>LibLogicalAccess RFID library layer for C#</Description>
<Copyright>Copyright (C) LibLogicalAccess 2025</Copyright>
<Version>3.2.0</Version>
<Version>3.2.0-3</Version>
<AssemblyVersion>3.2.0.0</AssemblyVersion>
<FileVersion>3.2.0.0</FileVersion>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand Down
10 changes: 5 additions & 5 deletions sources/scripts/update-gitversion-vs2017proj.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ param(
function GetGitVersion {
param()

$Branch=GitVersion.exe /output json /showvariable BranchName
$Branch=dotnet-gitversion.exe /output json /showvariable BranchName
$masterBranch = "master", "v1", "v2"
$version=GitVersion.exe /output json /showvariable NuGetVersionV2
$version=dotnet-gitversion.exe /output json /showvariable SemVer
if (!($Branch -in $masterBranch) -and (Test-Path env:BUILD_NUMBER))
{
$version = GitVersion.exe /output json /showvariable MajorMinorPatch
$version = dotnet-gitversion.exe /output json /showvariable MajorMinorPatch
$buildNumber = $Env:BUILD_NUMBER
$buildNumber = $buildNumber.padLeft(4, '0')
$version += "-" + $Branch + "-" + $buildNumber
Expand All @@ -28,8 +28,8 @@ if ($s.Project.Sdk -eq $null -or !($s.Project.Sdk -eq "Microsoft.NET.Sdk")) {
}

$NuGetVersionV2=GetGitVersion
$AssemblySemVer=Gitversion /output json /showvariable AssemblySemVer
$AssemblySemFileVer=Gitversion /output json /showvariable AssemblySemFileVer
$AssemblySemVer=dotnet-gitversion /output json /showvariable AssemblySemVer
$AssemblySemFileVer=dotnet-gitversion /output json /showvariable AssemblySemFileVer

if (!($s.Project.PropertyGroup -eq $null) -and !($s.Project.PropertyGroup[0] -eq $null))
{
Expand Down

0 comments on commit 77b48ab

Please sign in to comment.