Add git pull

This commit is contained in:
local-script 2025-05-09 15:50:42 +02:00
commit 2b36ff6f3f

View file

@ -1,3 +1,7 @@
# USAGE
#
# Variables # Variables
$RepoPath = "." # Replace with your local repo path $RepoPath = "." # Replace with your local repo path
$ArtifactsPath = "$RepoPath\artifacts" $ArtifactsPath = "$RepoPath\artifacts"
@ -17,6 +21,9 @@ $SolutionFile = "$RepoPath\src\Greenshot.sln"
#$Env:Picasa_ClientId = "your_picasa_client_id" #$Env:Picasa_ClientId = "your_picasa_client_id"
#$Env:Picasa_ClientSecret = "your_picasa_client_secret" #$Env:Picasa_ClientSecret = "your_picasa_client_secret"
# Step 0: Update Local Repository
git pull
# Step 1: Restore NuGet Packages # Step 1: Restore NuGet Packages
Write-Host "Restoring NuGet packages..." Write-Host "Restoring NuGet packages..."
msbuild "$SolutionFile" /p:Configuration=Release /restore /t:PrepareForBuild msbuild "$SolutionFile" /p:Configuration=Release /restore /t:PrepareForBuild
@ -136,14 +143,14 @@ if ($LASTEXITCODE -ne 0) {
Write-Host "File uploaded successfully: $FileName" Write-Host "File uploaded successfully: $FileName"
# Step 7: Trigger GitHub Pages Rebuild # Step 7: Trigger GitHub Pages Rebuild
Write-Host "Triggering GitHub Pages rebuild..." #Write-Host "Triggering GitHub Pages rebuild..."
Invoke-RestMethod ` #Invoke-RestMethod `
-Uri "https://api.github.com/repos/jklingen/greenshot/pages/builds" ` # -Uri "https://api.github.com/repos/jklingen/greenshot/pages/builds" `
-Method POST ` # -Method POST `
-Headers $Headers # -Headers $Headers
if ($LASTEXITCODE -ne 0) { #if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to trigger GitHub Pages rebuild." # Write-Error "Failed to trigger GitHub Pages rebuild."
exit $LASTEXITCODE # exit $LASTEXITCODE
} #}
#
Write-Host "GitHub Pages rebuild triggered successfully." #Write-Host "GitHub Pages rebuild triggered successfully."