Skip to content

Commit

Permalink
Fix issues with names and version numbers incompatible with [System.V…
Browse files Browse the repository at this point in the history
…ersion[]]

Fix issues with names and version numbers incompatible with [System.Version[]]

Some files in the repository have names ending in ..exe or have version numbers not following major.minor.build.revision causing variable assignment with [System.Version[]] to fail

Removing extension and whatever is after the correct version numbering with regex.
  • Loading branch information
sergiomiranda-outsystems committed Sep 5, 2023
1 parent c0dcba5 commit 0193256
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,27 @@ function Get-OSRepoAvailableVersions
'PlatformServer'
{
$AppFiles = $RepoFiles | Where-Object -FilterScript { $_ -like "PlatformServer-*" }
$AppVersions_Strings = $AppFiles -replace 'PlatformServer-', '' -replace '.exe', ''
$AppVersions_Strings = $AppFiles -replace 'PlatformServer-', '' -replace '(?<=\d+\.\d+\.\d+\.\d+)\D.*exe', ''
}
'Lifetime'
{
$AppFiles = $RepoFiles | Where-Object -FilterScript { $_ -like "LifeTimeWithPlatformServer-*" }
$AppVersions_Strings = $AppFiles -replace 'LifeTimeWithPlatformServer-', '' -replace '.exe', ''
$AppVersions_Strings = $AppFiles -replace 'LifeTimeWithPlatformServer-', '' -replace '(?<=\d+\.\d+\.\d+\.\d+)\D.*exe', ''
}
'DevelopmentEnvironment'
{
$AppFiles = $RepoFiles | Where-Object -FilterScript { $_ -like "DevelopmentEnvironment-*" }
$AppVersions_Strings = $AppFiles -replace 'DevelopmentEnvironment-', '' -replace '.exe', ''
$AppVersions_Strings = $AppFiles -replace 'DevelopmentEnvironment-', '' -replace '(?<=\d+\.\d+\.\d+\.\d+)\D.*exe', ''
}
'ServiceStudio'
{
$AppFiles = $RepoFiles | Where-Object -FilterScript { $_ -like "ServiceStudio-*" }
$AppVersions_Strings = $AppFiles -replace 'ServiceStudio-', '' -replace '.exe', ''
$AppVersions_Strings = $AppFiles -replace 'ServiceStudio-', '' -replace '(?<=\d+\.\d+\.\d+\.\d+)\D.*exe', ''
}
'IntegrationStudio'
{
$AppFiles = $RepoFiles | Where-Object -FilterScript { $_ -like "IntegrationStudio-*" }
$AppVersions_Strings = $AppFiles -replace 'IntegrationStudio-', '' -replace '.exe', ''
$AppVersions_Strings = $AppFiles -replace 'IntegrationStudio-', '' -replace '(?<=\d+\.\d+\.\d+\.\d+)\D.*exe', ''
}
}

Expand Down

0 comments on commit 0193256

Please sign in to comment.