-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_ci_config.ps1
More file actions
30 lines (26 loc) · 987 Bytes
/
update_ci_config.ps1
File metadata and controls
30 lines (26 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# PowerShell script to update CI configuration files for rechain rebranding
Write-Host "Updating CI configuration files..."
# Update .gitlab-ci.yml if it exists
if (Test-Path ".gitlab-ci.yml") {
Write-Host "Updating .gitlab-ci.yml..."
$content = Get-Content ".gitlab-ci.yml" -Raw
$content = $content -replace "polkadot", "rechain"
Set-Content -Path ".gitlab-ci.yml" -Value $content
}
# Update any other CI-related files
$ciFiles = @(
".github/workflows/*.yml",
".github/workflows/*.yaml",
"scripts/ci/*.sh",
"scripts/ci/**/*.sh"
)
foreach ($pattern in $ciFiles) {
$files = Get-ChildItem -Path $pattern -ErrorAction SilentlyContinue
foreach ($file in $files) {
Write-Host "Updating $($file.FullName)..."
$content = Get-Content $file.FullName -Raw
$content = $content -replace "polkadot", "rechain"
Set-Content -Path $file.FullName -Value $content
}
}
Write-Host "CI configuration files updated successfully!"