mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-17 18:26:11 +00:00
Version 5.12.15.test
PRUEBA
This commit is contained in:
@@ -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.Windows.Forms
|
||||||
|
Add-Type -AssemblyName System.Drawing
|
||||||
|
|
||||||
# 1. AUTODESCUBRIMIENTO
|
# 1. AUTODESCUBRIMIENTO
|
||||||
$projectPath = $PSScriptRoot
|
$projectPath = $PSScriptRoot
|
||||||
@@ -57,18 +58,29 @@ if ($oldCommit -eq $newCommit) {
|
|||||||
|
|
||||||
Write-Host ">> Commit detectado."
|
Write-Host ">> Commit detectado."
|
||||||
|
|
||||||
# 6. GESTIÓN DE TAGS (VISUAL)
|
# 6. GESTIÓN DE TAGS (VISUAL TOPMOST)
|
||||||
$remoteTagInfo = git ls-remote --tags origin $tagName
|
$remoteTagInfo = git ls-remote --tags origin $tagName
|
||||||
|
|
||||||
if ($remoteTagInfo) {
|
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)
|
[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)."
|
$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"
|
$msgTitle = "⚠️ Conflicto de Versiones - $projectName"
|
||||||
|
|
||||||
# Mostrar ventana Sí/No
|
# El mensaje ahora es "hijo" del formulario invisible, heredando su propiedad TopMost
|
||||||
$respuesta = [System.Windows.Forms.MessageBox]::Show($msgBody, $msgTitle, "YesNo", "Warning")
|
$respuesta = [System.Windows.Forms.MessageBox]::Show($topForm, $msgBody, $msgTitle, "YesNo", "Warning")
|
||||||
|
|
||||||
|
$topForm.Dispose() # Limpiamos el formulario invisible
|
||||||
|
|
||||||
if ($respuesta -eq "Yes") {
|
if ($respuesta -eq "Yes") {
|
||||||
Write-Host "Sobrescribiendo..."
|
Write-Host "Sobrescribiendo..."
|
||||||
|
|||||||
Reference in New Issue
Block a user