Skip to content

Commit d535415

Browse files
authored
Merge pull request #203 from Z-bit-Systems-LLC/develop
Complete PowerShell script path resolution fixes for Azure DevOps
2 parents bea31b0 + 5d858ec commit d535415

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

ci/package.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ steps:
7272
publishWebProjects: false
7373
zipAfterPublish: false
7474
modifyOutputPath: false
75-
projects: 'src/ACUConsole/ACUConsole.csproj'
76-
75+
projects: 'src/ACUConsole/ACUConsole.csproj'
7776
arguments: '-r linux-arm64 --configuration $(BuildConfiguration) --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true --output $(Build.ArtifactStagingDirectory)/TestConsole/linux-arm64'
7877

7978
- task: ArchiveFiles@2

scripts/Get-Version.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ param(
2626

2727
# Set default path if not provided
2828
if (-not $BuildPropsPath) {
29-
$BuildPropsPath = Join-Path $PSScriptRoot ".." "Directory.Build.props"
29+
if ($PSScriptRoot) {
30+
$BuildPropsPath = Join-Path $PSScriptRoot ".." "Directory.Build.props"
31+
} else {
32+
# Fallback for cases where PSScriptRoot is not available
33+
$BuildPropsPath = Join-Path (Get-Location) "Directory.Build.props"
34+
}
3035
}
3136

3237
function Get-Version {

scripts/Increment-Version.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ param(
2828

2929
# Set default path if not provided
3030
if (-not $BuildPropsPath) {
31-
$BuildPropsPath = Join-Path $PSScriptRoot ".." "Directory.Build.props"
31+
if ($PSScriptRoot) {
32+
$BuildPropsPath = Join-Path $PSScriptRoot ".." "Directory.Build.props"
33+
} else {
34+
# Fallback for cases where PSScriptRoot is not available
35+
$BuildPropsPath = Join-Path (Get-Location) "Directory.Build.props"
36+
}
3237
}
3338

3439
function Get-CurrentVersion {

scripts/Set-Version.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ param(
2525

2626
# Set default path if not provided
2727
if (-not $BuildPropsPath) {
28-
$BuildPropsPath = Join-Path $PSScriptRoot ".." "Directory.Build.props"
28+
if ($PSScriptRoot) {
29+
$BuildPropsPath = Join-Path $PSScriptRoot ".." "Directory.Build.props"
30+
} else {
31+
# Fallback for cases where PSScriptRoot is not available
32+
$BuildPropsPath = Join-Path (Get-Location) "Directory.Build.props"
33+
}
2934
}
3035

3136
function Validate-Version {

0 commit comments

Comments
 (0)