feat: initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# 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"
|
||||
|
||||
# Vérifie packwiz
|
||||
if (-not (Get-Command packwiz -ErrorAction SilentlyContinue)) {
|
||||
Write-Error "packwiz introuvable dans le PATH. Voir README §1."
|
||||
exit 1
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user