diff --git a/scripts/update-version.ps1 b/scripts/update-version.ps1 index 57ca601..9bfc086 100644 --- a/scripts/update-version.ps1 +++ b/scripts/update-version.ps1 @@ -12,33 +12,19 @@ Set-StrictMode -Version Latest $ErrorActionPreference = "Stop" $PSNativeCommandUseErrorActionPreference = $true -Write-Host "Updating version from $OldVersion to $NewVersion" - -# Update specific workflow files with _workflow_version inputs -Write-Host "Updating workflow files..." -$workflowFiles = @( - ".github/workflows/updater.yml", - ".github/workflows/danger.yml" -) - -foreach ($filePath in $workflowFiles) { - $content = Get-Content -Path $filePath -Raw - - # Check if this file has _workflow_version input with a default value - if ($content -match '(?ms)_workflow_version:.*?default:\s*([^\s#]+)') { - Write-Host "Updating $filePath..." - $oldDefault = $Matches[1] - - # Replace the default value for _workflow_version - $newContent = $content -replace '((?ms)_workflow_version:.*?default:\s*)([^\s#]+)', "`${1}'$NewVersion'" - - # Write the updated content back to the file - $newContent | Out-File -FilePath $filePath -Encoding utf8 -NoNewline - - Write-Host " Updated default from '$oldDefault' to '$NewVersion'" - } else { - Write-Error "No _workflow_version default found in $filePath" - } -} - -Write-Host "Version update completed successfully!" +Write-Host "Preparing release version update from $OldVersion to $NewVersion" + +# Note: Workflow files cannot be updated automatically during Craft releases +# because GitHub Apps don't have 'workflows' permission by default. +# +# After this release is published, manually update the following files: +# - .github/workflows/updater.yml (line ~45) +# - .github/workflows/danger.yml (line ~9) +# +# Change the default value from '$OldVersion' to '$NewVersion' + +Write-Host "" +Write-Host "⚠️ MANUAL ACTION REQUIRED AFTER RELEASE:" +Write-Host "Update _workflow_version defaults in workflow files from '$OldVersion' to '$NewVersion'" +Write-Host "" +Write-Host "Release preparation completed successfully!"