build/windows: Fix acidental revisions in scheduled pipelines

Some maintainers use the common pratice of evaluating variables to 1,
which breaks the revision detection code. Let's special case this.
This commit is contained in:
Bruno 2024-09-14 21:08:06 -03:00
parent b5cbe4e9dc
commit e898791a10
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ $gimp_version = Get-Content "$CONFIG_PATH" | Selec
Foreach-Object {$_ -replace '#define GIMP_VERSION "',''} | Foreach-Object {$_ -replace '"',''}
$APPVER = $gimp_version
if ($GIMP_CI_WIN_INSTALLER -and $GIMP_CI_WIN_INSTALLER -match '[0-9]')
if ($CI_PIPELINE_SOURCE -ne 'schedule' -and $GIMP_CI_WIN_INSTALLER -and $GIMP_CI_WIN_INSTALLER -match '[0-9]')
{
Write-Host "(WARNING): The revision is being made on CI, more updated deps than necessary may be packaged." -ForegroundColor yellow
$revision = $GIMP_CI_WIN_INSTALLER

View File

@ -78,7 +78,7 @@ if ($micro -eq '0')
}
## Get GIMP revision
if ($GIMP_CI_MS_STORE -like 'MSIXUPLOAD_*')
if ($CI_PIPELINE_SOURCE -ne 'schedule' -and $GIMP_CI_MS_STORE -like 'MSIXUPLOAD_*')
{
Write-Host "(WARNING): The revision is being made on CI, more updated deps than necessary may be packaged." -ForegroundColor yellow
$revision = $GIMP_CI_MS_STORE -replace 'MSIXUPLOAD_',''