Files
OFModpack/update-pack.ps1
T
2026-06-14 02:03:05 +02:00

28 lines
833 B
PowerShell

# Publie une mise à jour du modpack : régénère le manifeste packwiz puis
# commit + push. À lancer APRÈS tes packwiz cf add / update / remove.
#
# Usage : .\update-pack.ps1 "ce que j'ai changé"
param(
[Parameter(Mandatory = $false)]
[string]$Message = "update modpack"
)
$ErrorActionPreference = "Stop"
Write-Host "==> packwiz refresh (recalcul des hash / index.toml)" -ForegroundColor Cyan
.\packwiz refresh
Write-Host "==> git commit + push" -ForegroundColor Cyan
git add -A
# Ne commit que s'il y a des changements
git diff --cached --quiet
if ($LASTEXITCODE -ne 0) {
git commit -m $Message
git push
Write-Host "==> Pack publie. Les joueurs recevront le delta au prochain lancement." -ForegroundColor Green
}
else {
Write-Host "==> Rien a publier (aucun changement)." -ForegroundColor Yellow
}