Reindent scripts and Greeter.cs to 2 spaces (.editorconfig)
This commit is contained in:
1 parent
a4a6e039df
commit
32d194743e
5 files changed
+25
-25
No files matched your search
@@ -2,5 +2,5 @@ namespace Demo.Core;
|
|||||||
|
|
||||||
public static class Greeter
|
public static class Greeter
|
||||||
{
|
{
|
||||||
public static string Greet(string name) => Newtonsoft.Json.JsonConvert.SerializeObject(new { message = $"Hello, {name}!" });
|
public static string Greet(string name) => Newtonsoft.Json.JsonConvert.SerializeObject(new { message = $"Hello, {name}!" });
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,10 @@ param([switch]$Purge)
|
|||||||
|
|
||||||
podman stop renovate-forgejo 2>$null | Out-Null
|
podman stop renovate-forgejo 2>$null | Out-Null
|
||||||
if ($Purge) {
|
if ($Purge) {
|
||||||
podman rm -f renovate-forgejo 2>$null | Out-Null
|
podman rm -f renovate-forgejo 2>$null | Out-Null
|
||||||
podman volume rm -f renovate-forgejo-data 2>$null | Out-Null
|
podman volume rm -f renovate-forgejo-data 2>$null | Out-Null
|
||||||
Remove-Item (Join-Path $PSScriptRoot '.forgejo-token') -ErrorAction SilentlyContinue
|
Remove-Item (Join-Path $PSScriptRoot '.forgejo-token') -ErrorAction SilentlyContinue
|
||||||
Write-Host 'Forgejo removed including all data' -ForegroundColor Cyan
|
Write-Host 'Forgejo removed including all data' -ForegroundColor Cyan
|
||||||
} else {
|
} else {
|
||||||
Write-Host 'Forgejo stopped (data is kept; use -Purge to delete it)' -ForegroundColor Cyan
|
Write-Host 'Forgejo stopped (data is kept; use -Purge to delete it)' -ForegroundColor Cyan
|
||||||
}
|
}
|
||||||
+10
-10
@@ -9,24 +9,24 @@ $password = 'renovate'
|
|||||||
# ENABLE_PUSH_CREATE_USER: a repository is created automatically on the first "git push".
|
# ENABLE_PUSH_CREATE_USER: a repository is created automatically on the first "git push".
|
||||||
podman start renovate-forgejo 2>$null | Out-Null
|
podman start renovate-forgejo 2>$null | Out-Null
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
podman run -d --name renovate-forgejo -p 3000:3000 -v renovate-forgejo-data:/data `
|
podman run -d --name renovate-forgejo -p 3000:3000 -v renovate-forgejo-data:/data `
|
||||||
-e FORGEJO__security__INSTALL_LOCK=true `
|
-e FORGEJO__security__INSTALL_LOCK=true `
|
||||||
-e FORGEJO__repository__ENABLE_PUSH_CREATE_USER=true `
|
-e FORGEJO__repository__ENABLE_PUSH_CREATE_USER=true `
|
||||||
-e FORGEJO__repository__DEFAULT_BRANCH=main `
|
-e FORGEJO__repository__DEFAULT_BRANCH=main `
|
||||||
codeberg.org/forgejo/forgejo:11 | Out-Null
|
codeberg.org/forgejo/forgejo:11 | Out-Null
|
||||||
if ($LASTEXITCODE -ne 0) { throw 'Could not start the Forgejo container' }
|
if ($LASTEXITCODE -ne 0) { throw 'Could not start the Forgejo container' }
|
||||||
}
|
}
|
||||||
Write-Host 'Waiting for Forgejo ...'
|
Write-Host 'Waiting for Forgejo ...'
|
||||||
do {
|
do {
|
||||||
Start-Sleep -Seconds 1
|
Start-Sleep -Seconds 1
|
||||||
try { $ready = (Invoke-WebRequest 'http://localhost:3000/api/healthz' -UseBasicParsing).StatusCode -eq 200 } catch { $ready = $false }
|
try { $ready = (Invoke-WebRequest 'http://localhost:3000/api/healthz' -UseBasicParsing).StatusCode -eq 200 } catch { $ready = $false }
|
||||||
} until ($ready)
|
} until ($ready)
|
||||||
|
|
||||||
# 2. Create the bot user (ignore the error if it already exists) and generate a fresh access token
|
# 2. Create the bot user (ignore the error if it already exists) and generate a fresh access token
|
||||||
podman exec -u git renovate-forgejo forgejo admin user create --admin --username $username `
|
podman exec -u git renovate-forgejo forgejo admin user create --admin --username $username `
|
||||||
--password $password --email renovate@localhost --must-change-password=false 2>$null | Out-Null
|
--password $password --email renovate@localhost --must-change-password=false 2>$null | Out-Null
|
||||||
$token = podman exec -u git renovate-forgejo forgejo admin user generate-access-token `
|
$token = podman exec -u git renovate-forgejo forgejo admin user generate-access-token `
|
||||||
--username $username --token-name "renovate-$ts" --scopes all --raw
|
--username $username --token-name "renovate-$ts" --scopes all --raw
|
||||||
Set-Content -Path $tokenFile -Value $token -NoNewline
|
Set-Content -Path $tokenFile -Value $token -NoNewline
|
||||||
|
|
||||||
Write-Host "`nForgejo is running: http://localhost:3000" -ForegroundColor Cyan
|
Write-Host "`nForgejo is running: http://localhost:3000" -ForegroundColor Cyan
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ Pop-Location
|
|||||||
Write-Host "`nAvailable updates:" -ForegroundColor Cyan
|
Write-Host "`nAvailable updates:" -ForegroundColor Cyan
|
||||||
$packageFiles = (Get-Content $report -Raw -Encoding UTF8 | ConvertFrom-Json).repositories.local.packageFiles
|
$packageFiles = (Get-Content $report -Raw -Encoding UTF8 | ConvertFrom-Json).repositories.local.packageFiles
|
||||||
foreach ($manager in $packageFiles.PSObject.Properties) {
|
foreach ($manager in $packageFiles.PSObject.Properties) {
|
||||||
foreach ($file in $manager.Value) {
|
foreach ($file in $manager.Value) {
|
||||||
foreach ($dep in $file.deps) {
|
foreach ($dep in $file.deps) {
|
||||||
foreach ($update in $dep.updates) {
|
foreach ($update in $dep.updates) {
|
||||||
Write-Host " [$($manager.Name)] $($file.packageFile): $($dep.depName) $($dep.currentValue) -> $($update.newValue) ($($update.updateType))"
|
Write-Host " [$($manager.Name)] $($file.packageFile): $($dep.depName) $($dep.currentValue) -> $($update.newValue) ($($update.updateType))"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -28,9 +28,9 @@ if ($LASTEXITCODE -ne 0) { Pop-Location; throw 'git push failed' }
|
|||||||
$env:RENOVATE_GIT_AUTHOR = 'Renovate Bot <renovate@localhost>'
|
$env:RENOVATE_GIT_AUTHOR = 'Renovate Bot <renovate@localhost>'
|
||||||
$env:RENOVATE_COMMIT_MESSAGE_SUFFIX = $prTimestamp
|
$env:RENOVATE_COMMIT_MESSAGE_SUFFIX = $prTimestamp
|
||||||
npx --yes renovate@44.149.3 `
|
npx --yes renovate@44.149.3 `
|
||||||
--platform=forgejo --endpoint="$endpoint/api/v1" --token=$token `
|
--platform=forgejo --endpoint="$endpoint/api/v1" --token=$token `
|
||||||
--branch-prefix="renovate/$ts-" --branch-prefix-old="renovate/$ts-" `
|
--branch-prefix="renovate/$ts-" --branch-prefix-old="renovate/$ts-" `
|
||||||
$repo
|
$repo
|
||||||
$renovateExitCode = $LASTEXITCODE
|
$renovateExitCode = $LASTEXITCODE
|
||||||
Remove-Item Env:RENOVATE_GIT_AUTHOR, Env:RENOVATE_COMMIT_MESSAGE_SUFFIX
|
Remove-Item Env:RENOVATE_GIT_AUTHOR, Env:RENOVATE_COMMIT_MESSAGE_SUFFIX
|
||||||
if ($renovateExitCode -ne 0) { Pop-Location; throw 'Renovate failed' }
|
if ($renovateExitCode -ne 0) { Pop-Location; throw 'Renovate failed' }
|
||||||
|
|||||||
Reference in new issue
Block a user