Skip to content

Commit 2ff646e

Browse files
author
Trevor Payne
committed
fix: updated github workflows
1 parent c323b98 commit 2ff646e

File tree

5 files changed

+499
-108
lines changed

5 files changed

+499
-108
lines changed

.github/scripts/GenerateVersionNumber.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Foreach ($version in $latestVersions) {
77
$latestVersion = $version
88
Write-Host "Setting latest version to: $latestVersion"
99
}
10-
} catch {
10+
}
11+
catch {
1112
Write-Host "Unable to convert $($version). Skipping"
1213
continue;
1314
}
@@ -18,17 +19,19 @@ $phase = ""
1819
$newVersionString = ""
1920
switch -regex ($Env:GITHUB_REF) {
2021
'^refs\/heads\/main*.' {
21-
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1)
22+
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build
2223
}
2324
'^refs\/heads\/feature\/*.' {
2425
$phase = 'alpha'
2526
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
2627
}
2728
'^refs\/heads\/release\/*.' {
29+
$splitRef = $Env:GITHUB_REF -split "/"
30+
$version = [version]($splitRef[-1] -replace "v", "")
2831
$phase = 'rc'
29-
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
32+
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $version.Major, $version.Minor, $version.Build, $phase, $Env:GITHUB_RUN_NUMBER
3033
}
31-
'^refs\/heads\/development*.' {
34+
'^refs\/heads\/dev*.' {
3235
$phase = 'beta'
3336
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
3437
}

.github/scripts/ZipBuildOutput.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Get-ChildItem ($destination)
1010
$exclusions = @(git submodule foreach --quiet 'echo $name')
1111
# Trying to get any .json schema files (not currently working)
1212
# Gets any files with the listed extensions.
13-
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz" | ForEach-Object {
13+
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.cplz" | ForEach-Object {
1414
$allowed = $true;
1515
# Exclude any files in submodules
1616
foreach ($exclude in $exclusions) {
@@ -36,6 +36,7 @@ Get-ChildItem -Path $destination | Where-Object {($_.Extension -eq ".clz") -or (
3636
Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination) -Force
3737
}
3838
}
39+
Get-ChildItem -Path $destination\*.cplz | Rename-Item -NewName { "$($_.BaseName)-$($Env:VERSION)$($_.Extension)" }
3940
Compress-Archive -Path $destination -DestinationPath "$($Env:GITHUB_WORKSPACE)\$($Env:SOLUTION_FILE)-$($Env:VERSION).zip" -Force
4041
Write-Host "Output Contents post Zip"
4142
Get-ChildItem -Path $destination

.github/workflows/docker.yml

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)