Skip to content

Commit

Permalink
πŸ“ πŸ”§ Chore, Fix(Scripts): Fixed directory search logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Mar 4, 2024
1 parent 2b1f6df commit 2593e42
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/scripts/set-sign-info.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ storePassword=$storePassword
keyAlias=$keyAlias
storeFile=$storeFile"

$currentPath = Convert-Path .
$currentPath = $pwd.ToString()

Write-Debug "# Current path: $currentPath"

while (([DirectoryInfo]$currentPath).FullName -ne ([DirectoryInfo]$currentPath).Parent.FullName) {
Write-Debug "# Current path: $currentPath"

while ((Convert-Path $currentPath) -ne ([DirectoryInfo]$currentPath).Parent.FullName) {
$relativeKitxMobilePath = Join-Path $currentPath "kitx_mobile"
$resolvedKitxMobilePath = Resolve-Path $relativeKitxMobilePath -ErrorAction SilentlyContinue

Write-Debug "# Relative path: $relativeKitxMobilePath"
Write-Debug "# Resolved path: $resolvedKitxMobilePath"

if ($resolvedKitxMobilePath -and (Test-Path $resolvedKitxMobilePath -Type Container)) {
Set-Location $resolvedKitxMobilePath.ProviderPath
break
} else {
$currentPath = ([DirectoryInfo]$currentPath).Parent.FullName
}
else {
$currentPath = [DirectoryInfo]$currentPath.Parent.FullName
}

Write-Host "Changing directory to $pwd"
}

if (Test-Path "pubspec.yaml") {
Expand Down

0 comments on commit 2593e42

Please sign in to comment.