update
This commit is contained in:
16
update.ps1
16
update.ps1
@@ -28,9 +28,12 @@ $token = (Get-Content $TokenFile -Raw).Trim()
|
|||||||
|
|
||||||
# Fetch remote
|
# Fetch remote
|
||||||
Set-Location $RepoPath
|
Set-Location $RepoPath
|
||||||
git -c credential.helper="" fetch "https://gomag-vending:$token@gitea.romfast.ro/romfast/gomag-vending.git" main 2>&1 | Out-Null
|
$fetchUrl = "https://gomag-vending:$token@gitea.romfast.ro/romfast/gomag-vending.git"
|
||||||
if ($LASTEXITCODE -ne 0) {
|
$env:GIT_TERMINAL_PROMPT = "0"
|
||||||
Log "EROARE: git fetch esuat!" "Red"
|
$fetchOutput = & git -c credential.helper="" fetch $fetchUrl main 2>&1
|
||||||
|
$fetchExit = $LASTEXITCODE
|
||||||
|
if ($fetchExit -ne 0) {
|
||||||
|
Log "EROARE: git fetch esuat (exit=$fetchExit): $fetchOutput" "Red"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,9 +55,10 @@ if (-not $Silent) {
|
|||||||
|
|
||||||
# Git pull
|
# Git pull
|
||||||
Log "==> Git pull..." "Cyan"
|
Log "==> Git pull..." "Cyan"
|
||||||
git -c credential.helper="" pull "https://gomag-vending:$token@gitea.romfast.ro/romfast/gomag-vending.git" 2>&1 | Out-Null
|
$pullOutput = & git -c credential.helper="" pull $fetchUrl 2>&1
|
||||||
if ($LASTEXITCODE -ne 0) {
|
$pullExit = $LASTEXITCODE
|
||||||
Log "EROARE: git pull esuat!" "Red"
|
if ($pullExit -ne 0) {
|
||||||
|
Log "EROARE: git pull esuat (exit=$pullExit): $pullOutput" "Red"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user