Version 5.12.15.test

PRUEBA
This commit is contained in:
2025-12-20 01:46:25 -06:00
parent e72a1381d5
commit 63df3fbf39

View File

@@ -1,7 +1,8 @@
# --- SCRIPT DE AUTODESCUBRIMIENTO CON INTERFAZ VISUAL ---
# --- SCRIPT DE AUTODESCUBRIMIENTO CON GUI MEJORADA ---
# Cargar librería para mensajes visuales
# Cargar librería visual
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
# 1. AUTODESCUBRIMIENTO
$projectPath = $PSScriptRoot
@@ -57,18 +58,29 @@ if ($oldCommit -eq $newCommit) {
Write-Host ">> Commit detectado."
# 6. GESTIÓN DE TAGS (VISUAL)
# 6. GESTIÓN DE TAGS (VISUAL TOPMOST)
$remoteTagInfo = git ls-remote --tags origin $tagName
if ($remoteTagInfo) {
# --- AQUÍ ESTÁ LA MAGIA: VENTANA EMERGENTE ---
# --- TRUCO PARA QUE LA VENTANA SALGA AL FRENTE ---
# Creamos un formulario invisible que esté "Siempre Visible" (TopMost)
$topForm = New-Object System.Windows.Forms.Form
$topForm.TopMost = $true
$topForm.Opacity = 0 # Invisible
$topForm.ShowInTaskbar = $false
$topForm.StartPosition = "CenterScreen"
$topForm.Show()
$topForm.Activate()
[System.Console]::Beep(1000, 200)
$msgBody = "El tag '$tagName' YA EXISTE en GitHub.`n`n¿Deseas SOBRESCRIBIRLO?`n`nSí = Borrar anterior y actualizar.`nNo = Subir solo código (mantener tag viejo)."
$msgTitle = "Conflicto de Versiones - $projectName"
$msgBody = "El tag '$tagName' YA EXISTE en GitHub.`n`n¿Deseas SOBRESCRIBIRLO?`n`nSí = Borrar anterior y actualizar (Force Push).`nNo = Subir solo código (mantener tag viejo)."
$msgTitle = "⚠️ Conflicto de Versiones - $projectName"
# Mostrar ventana Sí/No
$respuesta = [System.Windows.Forms.MessageBox]::Show($msgBody, $msgTitle, "YesNo", "Warning")
# El mensaje ahora es "hijo" del formulario invisible, heredando su propiedad TopMost
$respuesta = [System.Windows.Forms.MessageBox]::Show($topForm, $msgBody, $msgTitle, "YesNo", "Warning")
$topForm.Dispose() # Limpiamos el formulario invisible
if ($respuesta -eq "Yes") {
Write-Host "Sobrescribiendo..."