From fc037802811c22c9874372b3cc87a3fd80b240d5 Mon Sep 17 00:00:00 2001 From: kislovdm Date: Tue, 9 Jan 2024 21:27:45 +0300 Subject: [PATCH] ++ --- src/build/GetBuildVersion.psm1 | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/build/GetBuildVersion.psm1 diff --git a/src/build/GetBuildVersion.psm1 b/src/build/GetBuildVersion.psm1 deleted file mode 100644 index 11ea5d0..0000000 --- a/src/build/GetBuildVersion.psm1 +++ /dev/null @@ -1,34 +0,0 @@ -Function GetBuildVersion { - Param ( - [string]$VersionString - ) - - # Process through regex - $VersionString -match "(?\d+)(\.(?\d+))?(\.(?\d+))?(\-(?
[0-9A-Za-z\-\.]+))?(\+(?\d+))?" | Out-Null
-
-    if ($matches -eq $null) {
-        return "1.0.0-build"
-    }
-
-    # Extract the build metadata
-    $BuildRevision = [uint64]$matches['build']
-    # Extract the pre-release tag
-    $PreReleaseTag = [string]$matches['pre']
-    # Extract the patch
-    $Patch = [uint64]$matches['patch']
-    # Extract the minor
-    $Minor = [uint64]$matches['minor']
-    # Extract the major
-    $Major = [uint64]$matches['major']
-
-    $Version = [string]$Major + '.' + [string]$Minor + '.' + [string]$Patch;
-    if ($PreReleaseTag -ne [string]::Empty) {
-        $Version = $Version + '-' + $PreReleaseTag
-    }
-
-    if ($BuildRevision -ne 0) {
-        $Version = $Version + '.' + [string]$BuildRevision
-    }
-
-    return $Version
-}
\ No newline at end of file