forgegit 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MANUAL.md +61 -68
- package/config.cmd +14 -14
- package/init.cmd +199 -190
- package/lib/git-ops.cmd +91 -91
- package/lib/templates.cmd +98 -97
- package/lib/ui.cmd +58 -57
- package/package.json +1 -1
- package/templates/forge.cmd.tpl +6 -2
- package/templates/serve-static.js +86 -0
- package/templates/serve.cmd.tpl +209 -0
package/MANUAL.md
CHANGED
|
@@ -1,68 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
$utf8 = New-Object System.Text.UTF8Encoding($false)
|
|
64
|
-
[System.IO.File]::WriteAllText("$PWD\MANUAL.txt", $content, $utf8)
|
|
65
|
-
|
|
66
|
-
Write-Host " [OK] MANUAL.txt creado" -ForegroundColor Green
|
|
67
|
-
Write-Host ""
|
|
68
|
-
Get-Item "MANUAL.txt" | Select-Object Name, Length
|
|
1
|
+
# forgeGit - Manual de uso
|
|
2
|
+
|
|
3
|
+
Guia completa de instalacion, uso y mantenimiento.
|
|
4
|
+
|
|
5
|
+
## Instalacion
|
|
6
|
+
|
|
7
|
+
npm install -g forgegit
|
|
8
|
+
|
|
9
|
+
O descarga el ZIP desde:
|
|
10
|
+
https://github.com/vloitz/forgeGit/releases/latest
|
|
11
|
+
|
|
12
|
+
Requisitos: Windows 10/11, Node.js 18+, Git 2.30+
|
|
13
|
+
|
|
14
|
+
## Uso en un proyecto nuevo
|
|
15
|
+
|
|
16
|
+
cd ruta\del\proyecto
|
|
17
|
+
forge
|
|
18
|
+
|
|
19
|
+
El proyecto queda con Git, .gitignore, README.md, commit inicial,
|
|
20
|
+
tag v1.0.0 y 7 helpers en .forge/commands/.
|
|
21
|
+
|
|
22
|
+
## Comandos disponibles
|
|
23
|
+
|
|
24
|
+
| Comando | Descripcion |
|
|
25
|
+
|---------|-------------|
|
|
26
|
+
| forge save | Commit de cambios |
|
|
27
|
+
| forge push | Push a GitHub |
|
|
28
|
+
| forge log | Ver commits recientes |
|
|
29
|
+
| forge snap | Crear/restaurar snapshots |
|
|
30
|
+
| forge audit | Generar reporte diff |
|
|
31
|
+
| forge open | Abrir en VS Code |
|
|
32
|
+
| forge serve | Servidor de desarrollo (auto-detect) |
|
|
33
|
+
| forge help | Ayuda completa |
|
|
34
|
+
|
|
35
|
+
## Estructura del proyecto
|
|
36
|
+
|
|
37
|
+
MiProyecto/
|
|
38
|
+
├── forge.cmd Menu + CLI
|
|
39
|
+
├── init.cmd Bootstrap
|
|
40
|
+
├── config.cmd Configuracion
|
|
41
|
+
├── .forge/
|
|
42
|
+
│ ├── commands/ 6 helpers
|
|
43
|
+
│ ├── lib/ Modulos internos
|
|
44
|
+
│ ├── templates/ Fuentes .tpl
|
|
45
|
+
│ └── serve-static.js
|
|
46
|
+
└── (tus archivos)
|
|
47
|
+
|
|
48
|
+
## Actualizar
|
|
49
|
+
|
|
50
|
+
npm install -g forgegit@latest
|
|
51
|
+
forge update
|
|
52
|
+
|
|
53
|
+
## Links
|
|
54
|
+
|
|
55
|
+
- Repo: https://github.com/vloitz/forgeGit
|
|
56
|
+
- npm: https://www.npmjs.com/package/forgegit
|
|
57
|
+
- Releases: https://github.com/vloitz/forgeGit/releases
|
|
58
|
+
|
|
59
|
+
## Licencia
|
|
60
|
+
|
|
61
|
+
MIT
|
package/config.cmd
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
REM ============================================================
|
|
2
|
-
REM forge-git / config.cmd
|
|
3
|
-
REM Configuration - edit these values to customize
|
|
4
|
-
REM Called from init.cmd via: call config.cmd
|
|
5
|
-
REM ============================================================
|
|
6
|
-
|
|
7
|
-
set "FG_VERSION=1.
|
|
8
|
-
set "TAG_INITIAL=v1.0.0"
|
|
9
|
-
set "TAG_MESSAGE=Primera version estable"
|
|
10
|
-
set "BRANCH_MAIN=main"
|
|
11
|
-
set "COMMIT_MESSAGE=chore: initial commit"
|
|
12
|
-
|
|
13
|
-
REM --- Exclusions for subir.cmd (robocopy) ---
|
|
14
|
-
set "EXCLUDE_DIRS=.git versiones old_versions backup backups node_modules __pycache__ venv .venv env dist build out cache .cache .parcel-cache .vite .vscode .idea"
|
|
1
|
+
REM ============================================================
|
|
2
|
+
REM forge-git / config.cmd
|
|
3
|
+
REM Configuration - edit these values to customize
|
|
4
|
+
REM Called from init.cmd via: call config.cmd
|
|
5
|
+
REM ============================================================
|
|
6
|
+
|
|
7
|
+
set "FG_VERSION=1.4.0"
|
|
8
|
+
set "TAG_INITIAL=v1.0.0"
|
|
9
|
+
set "TAG_MESSAGE=Primera version estable"
|
|
10
|
+
set "BRANCH_MAIN=main"
|
|
11
|
+
set "COMMIT_MESSAGE=chore: initial commit"
|
|
12
|
+
|
|
13
|
+
REM --- Exclusions for subir.cmd (robocopy) ---
|
|
14
|
+
set "EXCLUDE_DIRS=.git versiones old_versions backup backups node_modules __pycache__ venv .venv env dist build out cache .cache .parcel-cache .vite .vscode .idea"
|
|
15
15
|
set "EXCLUDE_FILES=*.log *.tmp *.bak *.orig Thumbs.db .DS_Store"
|
package/init.cmd
CHANGED
|
@@ -1,191 +1,200 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
setlocal EnableDelayedExpansion
|
|
3
|
-
chcp 65001 >nul 2>nul
|
|
4
|
-
|
|
5
|
-
cd /d "%~dp0"
|
|
6
|
-
cls
|
|
7
|
-
|
|
8
|
-
set "ROOT=%~dp0"
|
|
9
|
-
|
|
10
|
-
REM --- Detectar donde esta lib/ y templates/ ---
|
|
11
|
-
if exist ".forge\lib\ui.cmd" (
|
|
12
|
-
set "LIB=%ROOT%.forge\lib"
|
|
13
|
-
set "TPL=%ROOT%.forge\templates"
|
|
14
|
-
set "CMDS=%ROOT%.forge\commands"
|
|
15
|
-
) else (
|
|
16
|
-
set "LIB=%ROOT%lib"
|
|
17
|
-
set "TPL=%ROOT%templates"
|
|
18
|
-
set "CMDS=%ROOT%.forge\commands"
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
REM --- Force mode ---
|
|
22
|
-
set "FORCE=0"
|
|
23
|
-
if /i "%~1"=="--force" set "FORCE=1"
|
|
24
|
-
if /i "%~1"=="force" set "FORCE=1"
|
|
25
|
-
if /i "%~1"=="-f" set "FORCE=1"
|
|
26
|
-
|
|
27
|
-
call "%ROOT%config.cmd"
|
|
28
|
-
|
|
29
|
-
for %%a in ("%CD%") do set "PROJECT_NAME=%%~nxa"
|
|
30
|
-
|
|
31
|
-
call "%LIB%\ui.cmd" banner
|
|
32
|
-
|
|
33
|
-
REM --- STEP 1/
|
|
34
|
-
where node >nul 2>nul
|
|
35
|
-
if errorlevel 1 (
|
|
36
|
-
echo [1/
|
|
37
|
-
echo Descargalo desde: https://nodejs.org/
|
|
38
|
-
goto :abort
|
|
39
|
-
)
|
|
40
|
-
for /f "tokens=*" %%v in ('node --version 2^>nul') do set "NODE_VER=%%v"
|
|
41
|
-
call "%LIB%\ui.cmd" step 1/
|
|
42
|
-
|
|
43
|
-
REM --- STEP 2/
|
|
44
|
-
where git >nul 2>nul
|
|
45
|
-
if errorlevel 1 (
|
|
46
|
-
echo [2/
|
|
47
|
-
echo Descargalo desde: https://git-scm.com/download/win
|
|
48
|
-
goto :abort
|
|
49
|
-
)
|
|
50
|
-
for /f "tokens=*" %%v in ('git --version 2^>nul') do set "GIT_VER=%%v"
|
|
51
|
-
call "%LIB%\ui.cmd" step 2/
|
|
52
|
-
|
|
53
|
-
REM --- STEP 3/
|
|
54
|
-
call "%LIB%\git-ops.cmd" init
|
|
55
|
-
|
|
56
|
-
REM --- STEP 4/
|
|
57
|
-
call "%LIB%\git-ops.cmd" branch_main
|
|
58
|
-
|
|
59
|
-
REM --- STEP 5/
|
|
60
|
-
if exist ".forge\commands" goto :step5_ok
|
|
61
|
-
mkdir ".forge" 2>nul
|
|
62
|
-
mkdir ".forge\commands" 2>nul
|
|
63
|
-
mkdir ".forge\lib" 2>nul
|
|
64
|
-
mkdir ".forge\templates" 2>nul
|
|
65
|
-
call "%LIB%\ui.cmd" step 5/
|
|
66
|
-
goto :step6
|
|
67
|
-
:step5_ok
|
|
68
|
-
call "%LIB%\ui.cmd" step 5/
|
|
69
|
-
|
|
70
|
-
:step6
|
|
71
|
-
REM --- STEP 6/
|
|
72
|
-
if exist ".gitignore" goto :step6_ok
|
|
73
|
-
call "%LIB%\templates.cmd" write_gitignore
|
|
74
|
-
call "%LIB%\ui.cmd" step 6/
|
|
75
|
-
goto :step7
|
|
76
|
-
:step6_ok
|
|
77
|
-
call "%LIB%\ui.cmd" step 6/
|
|
78
|
-
|
|
79
|
-
:step7
|
|
80
|
-
REM --- STEP 7/
|
|
81
|
-
if exist "README.md" goto :step7_ok
|
|
82
|
-
call "%LIB%\templates.cmd" write_readme
|
|
83
|
-
call "%LIB%\ui.cmd" step 7/
|
|
84
|
-
goto :step8
|
|
85
|
-
:step7_ok
|
|
86
|
-
call "%LIB%\ui.cmd" step 7/
|
|
87
|
-
|
|
88
|
-
:step8
|
|
89
|
-
REM --- STEP 8/
|
|
90
|
-
if exist "forge.cmd" goto :step8_ok
|
|
91
|
-
call "%LIB%\templates.cmd" write_forge
|
|
92
|
-
call "%LIB%\ui.cmd" step 8/
|
|
93
|
-
goto :step9
|
|
94
|
-
:step8_ok
|
|
95
|
-
call "%LIB%\ui.cmd" step 8/
|
|
96
|
-
|
|
97
|
-
:step9
|
|
98
|
-
REM --- STEP 9/
|
|
99
|
-
if exist ".forge\commands\save.cmd" goto :step9_ok
|
|
100
|
-
call "%LIB%\templates.cmd" write_save
|
|
101
|
-
call "%LIB%\ui.cmd" step 9/
|
|
102
|
-
goto :step10
|
|
103
|
-
:step9_ok
|
|
104
|
-
call "%LIB%\ui.cmd" step 9/
|
|
105
|
-
|
|
106
|
-
:step10
|
|
107
|
-
REM --- STEP 10/
|
|
108
|
-
if exist ".forge\commands\push.cmd" goto :step10_ok
|
|
109
|
-
call "%LIB%\templates.cmd" write_push
|
|
110
|
-
call "%LIB%\ui.cmd" step 10/
|
|
111
|
-
goto :step11
|
|
112
|
-
:step10_ok
|
|
113
|
-
call "%LIB%\ui.cmd" step 10/
|
|
114
|
-
|
|
115
|
-
:step11
|
|
116
|
-
REM --- STEP 11/
|
|
117
|
-
if exist ".forge\commands\snapshots.cmd" goto :step11_ok
|
|
118
|
-
call "%LIB%\templates.cmd" write_snapshots
|
|
119
|
-
call "%LIB%\ui.cmd" step 11/
|
|
120
|
-
goto :step12
|
|
121
|
-
:step11_ok
|
|
122
|
-
call "%LIB%\ui.cmd" step 11/
|
|
123
|
-
|
|
124
|
-
:step12
|
|
125
|
-
REM --- STEP 12/
|
|
126
|
-
if exist ".forge\commands\historial.cmd" goto :step12_ok
|
|
127
|
-
call "%LIB%\templates.cmd" write_historial
|
|
128
|
-
call "%LIB%\ui.cmd" step 12/
|
|
129
|
-
goto :step13
|
|
130
|
-
:step12_ok
|
|
131
|
-
call "%LIB%\ui.cmd" step 12/
|
|
132
|
-
|
|
133
|
-
:step13
|
|
134
|
-
REM --- STEP 13/
|
|
135
|
-
if exist ".forge\commands\abrir.cmd" goto :step13_ok
|
|
136
|
-
call "%LIB%\templates.cmd" write_abrir
|
|
137
|
-
call "%LIB%\ui.cmd" step 13/
|
|
138
|
-
goto :step14
|
|
139
|
-
:step13_ok
|
|
140
|
-
call "%LIB%\ui.cmd" step 13/
|
|
141
|
-
|
|
142
|
-
:step14
|
|
143
|
-
REM --- STEP 14/
|
|
144
|
-
if exist ".forge\commands\auditar.cmd" goto :step14_ok
|
|
145
|
-
call "%LIB%\templates.cmd" write_auditar
|
|
146
|
-
call "%LIB%\ui.cmd" step 14/
|
|
147
|
-
goto :step15
|
|
148
|
-
:step14_ok
|
|
149
|
-
call "%LIB%\ui.cmd" step 14/
|
|
150
|
-
|
|
151
|
-
:step15
|
|
152
|
-
REM --- STEP 15/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if
|
|
167
|
-
call "%LIB%\
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
call "%LIB%\ui.cmd"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal EnableDelayedExpansion
|
|
3
|
+
chcp 65001 >nul 2>nul
|
|
4
|
+
|
|
5
|
+
cd /d "%~dp0"
|
|
6
|
+
cls
|
|
7
|
+
|
|
8
|
+
set "ROOT=%~dp0"
|
|
9
|
+
|
|
10
|
+
REM --- Detectar donde esta lib/ y templates/ ---
|
|
11
|
+
if exist ".forge\lib\ui.cmd" (
|
|
12
|
+
set "LIB=%ROOT%.forge\lib"
|
|
13
|
+
set "TPL=%ROOT%.forge\templates"
|
|
14
|
+
set "CMDS=%ROOT%.forge\commands"
|
|
15
|
+
) else (
|
|
16
|
+
set "LIB=%ROOT%lib"
|
|
17
|
+
set "TPL=%ROOT%templates"
|
|
18
|
+
set "CMDS=%ROOT%.forge\commands"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
REM --- Force mode ---
|
|
22
|
+
set "FORCE=0"
|
|
23
|
+
if /i "%~1"=="--force" set "FORCE=1"
|
|
24
|
+
if /i "%~1"=="force" set "FORCE=1"
|
|
25
|
+
if /i "%~1"=="-f" set "FORCE=1"
|
|
26
|
+
|
|
27
|
+
call "%ROOT%config.cmd"
|
|
28
|
+
|
|
29
|
+
for %%a in ("%CD%") do set "PROJECT_NAME=%%~nxa"
|
|
30
|
+
|
|
31
|
+
call "%LIB%\ui.cmd" banner
|
|
32
|
+
|
|
33
|
+
REM --- STEP 1/17: Node.js ---
|
|
34
|
+
where node >nul 2>nul
|
|
35
|
+
if errorlevel 1 (
|
|
36
|
+
echo [1/17] Node.js MISSING
|
|
37
|
+
echo Descargalo desde: https://nodejs.org/
|
|
38
|
+
goto :abort
|
|
39
|
+
)
|
|
40
|
+
for /f "tokens=*" %%v in ('node --version 2^>nul') do set "NODE_VER=%%v"
|
|
41
|
+
call "%LIB%\ui.cmd" step 1/17 "Node.js !NODE_VER!" "OK"
|
|
42
|
+
|
|
43
|
+
REM --- STEP 2/17: Git ---
|
|
44
|
+
where git >nul 2>nul
|
|
45
|
+
if errorlevel 1 (
|
|
46
|
+
echo [2/17] Git MISSING
|
|
47
|
+
echo Descargalo desde: https://git-scm.com/download/win
|
|
48
|
+
goto :abort
|
|
49
|
+
)
|
|
50
|
+
for /f "tokens=*" %%v in ('git --version 2^>nul') do set "GIT_VER=%%v"
|
|
51
|
+
call "%LIB%\ui.cmd" step 2/17 "!GIT_VER!" "OK"
|
|
52
|
+
|
|
53
|
+
REM --- STEP 3/17: Init repo ---
|
|
54
|
+
call "%LIB%\git-ops.cmd" init
|
|
55
|
+
|
|
56
|
+
REM --- STEP 4/17: Branch main ---
|
|
57
|
+
call "%LIB%\git-ops.cmd" branch_main
|
|
58
|
+
|
|
59
|
+
REM --- STEP 5/17: Crear estructura .forge/ ---
|
|
60
|
+
if exist ".forge\commands" goto :step5_ok
|
|
61
|
+
mkdir ".forge" 2>nul
|
|
62
|
+
mkdir ".forge\commands" 2>nul
|
|
63
|
+
mkdir ".forge\lib" 2>nul
|
|
64
|
+
mkdir ".forge\templates" 2>nul
|
|
65
|
+
call "%LIB%\ui.cmd" step 5/17 "Estructura .forge/" "CREADO"
|
|
66
|
+
goto :step6
|
|
67
|
+
:step5_ok
|
|
68
|
+
call "%LIB%\ui.cmd" step 5/17 "Estructura .forge/" "YA EXISTE"
|
|
69
|
+
|
|
70
|
+
:step6
|
|
71
|
+
REM --- STEP 6/17: .gitignore ---
|
|
72
|
+
if exist ".gitignore" goto :step6_ok
|
|
73
|
+
call "%LIB%\templates.cmd" write_gitignore
|
|
74
|
+
call "%LIB%\ui.cmd" step 6/17 ".gitignore universal" "CREADO"
|
|
75
|
+
goto :step7
|
|
76
|
+
:step6_ok
|
|
77
|
+
call "%LIB%\ui.cmd" step 6/17 ".gitignore" "YA EXISTE"
|
|
78
|
+
|
|
79
|
+
:step7
|
|
80
|
+
REM --- STEP 7/17: README.md ---
|
|
81
|
+
if exist "README.md" goto :step7_ok
|
|
82
|
+
call "%LIB%\templates.cmd" write_readme
|
|
83
|
+
call "%LIB%\ui.cmd" step 7/17 "README.md adaptativo" "CREADO"
|
|
84
|
+
goto :step8
|
|
85
|
+
:step7_ok
|
|
86
|
+
call "%LIB%\ui.cmd" step 7/17 "README.md" "YA EXISTE"
|
|
87
|
+
|
|
88
|
+
:step8
|
|
89
|
+
REM --- STEP 8/17: forge.cmd ---
|
|
90
|
+
if exist "forge.cmd" goto :step8_ok
|
|
91
|
+
call "%LIB%\templates.cmd" write_forge
|
|
92
|
+
call "%LIB%\ui.cmd" step 8/17 "forge.cmd menu" "CREADO"
|
|
93
|
+
goto :step9
|
|
94
|
+
:step8_ok
|
|
95
|
+
call "%LIB%\ui.cmd" step 8/17 "forge.cmd" "YA EXISTE"
|
|
96
|
+
|
|
97
|
+
:step9
|
|
98
|
+
REM --- STEP 9/17: save.cmd ---
|
|
99
|
+
if exist ".forge\commands\save.cmd" goto :step9_ok
|
|
100
|
+
call "%LIB%\templates.cmd" write_save
|
|
101
|
+
call "%LIB%\ui.cmd" step 9/17 "save.cmd" "CREADO"
|
|
102
|
+
goto :step10
|
|
103
|
+
:step9_ok
|
|
104
|
+
call "%LIB%\ui.cmd" step 9/17 "save.cmd" "YA EXISTE"
|
|
105
|
+
|
|
106
|
+
:step10
|
|
107
|
+
REM --- STEP 10/17: push.cmd ---
|
|
108
|
+
if exist ".forge\commands\push.cmd" goto :step10_ok
|
|
109
|
+
call "%LIB%\templates.cmd" write_push
|
|
110
|
+
call "%LIB%\ui.cmd" step 10/17 "push.cmd" "CREADO"
|
|
111
|
+
goto :step11
|
|
112
|
+
:step10_ok
|
|
113
|
+
call "%LIB%\ui.cmd" step 10/17 "push.cmd" "YA EXISTE"
|
|
114
|
+
|
|
115
|
+
:step11
|
|
116
|
+
REM --- STEP 11/17: snapshots.cmd ---
|
|
117
|
+
if exist ".forge\commands\snapshots.cmd" goto :step11_ok
|
|
118
|
+
call "%LIB%\templates.cmd" write_snapshots
|
|
119
|
+
call "%LIB%\ui.cmd" step 11/17 "snapshots.cmd" "CREADO"
|
|
120
|
+
goto :step12
|
|
121
|
+
:step11_ok
|
|
122
|
+
call "%LIB%\ui.cmd" step 11/17 "snapshots.cmd" "YA EXISTE"
|
|
123
|
+
|
|
124
|
+
:step12
|
|
125
|
+
REM --- STEP 12/17: historial.cmd ---
|
|
126
|
+
if exist ".forge\commands\historial.cmd" goto :step12_ok
|
|
127
|
+
call "%LIB%\templates.cmd" write_historial
|
|
128
|
+
call "%LIB%\ui.cmd" step 12/17 "historial.cmd" "CREADO"
|
|
129
|
+
goto :step13
|
|
130
|
+
:step12_ok
|
|
131
|
+
call "%LIB%\ui.cmd" step 12/17 "historial.cmd" "YA EXISTE"
|
|
132
|
+
|
|
133
|
+
:step13
|
|
134
|
+
REM --- STEP 13/17: abrir.cmd ---
|
|
135
|
+
if exist ".forge\commands\abrir.cmd" goto :step13_ok
|
|
136
|
+
call "%LIB%\templates.cmd" write_abrir
|
|
137
|
+
call "%LIB%\ui.cmd" step 13/17 "abrir.cmd" "CREADO"
|
|
138
|
+
goto :step14
|
|
139
|
+
:step13_ok
|
|
140
|
+
call "%LIB%\ui.cmd" step 13/17 "abrir.cmd" "YA EXISTE"
|
|
141
|
+
|
|
142
|
+
:step14
|
|
143
|
+
REM --- STEP 14/17: auditar.cmd ---
|
|
144
|
+
if exist ".forge\commands\auditar.cmd" goto :step14_ok
|
|
145
|
+
call "%LIB%\templates.cmd" write_auditar
|
|
146
|
+
call "%LIB%\ui.cmd" step 14/17 "auditar.cmd" "CREADO"
|
|
147
|
+
goto :step15
|
|
148
|
+
:step14_ok
|
|
149
|
+
call "%LIB%\ui.cmd" step 14/17 "auditar.cmd" "YA EXISTE"
|
|
150
|
+
|
|
151
|
+
:step15
|
|
152
|
+
REM --- STEP 15/17: serve.cmd ---
|
|
153
|
+
if exist ".forge\commands\serve.cmd" goto :step15_ok
|
|
154
|
+
call "%LIB%\templates.cmd" write_serve
|
|
155
|
+
call "%LIB%\ui.cmd" step 15/17 "serve.cmd" "CREADO"
|
|
156
|
+
goto :step16
|
|
157
|
+
:step15_ok
|
|
158
|
+
call "%LIB%\ui.cmd" step 15/17 "serve.cmd" "YA EXISTE"
|
|
159
|
+
|
|
160
|
+
:step16
|
|
161
|
+
REM --- STEP 16/17: Commit ---
|
|
162
|
+
call "%LIB%\git-ops.cmd" has_changes
|
|
163
|
+
if errorlevel 1 (
|
|
164
|
+
set "USER_MSG="
|
|
165
|
+
set /p "USER_MSG= Mensaje del commit [Enter = default]: "
|
|
166
|
+
if "!USER_MSG!"=="" set "USER_MSG=%COMMIT_MESSAGE%"
|
|
167
|
+
call "%LIB%\git-ops.cmd" commit "!USER_MSG!"
|
|
168
|
+
call "%LIB%\ui.cmd" step 16/17 "Commit: !USER_MSG!" "CREADO"
|
|
169
|
+
) else (
|
|
170
|
+
call "%LIB%\ui.cmd" step 16/17 "Sin cambios para commit" "SKIP"
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
REM --- STEP 17/17: Tag ---
|
|
174
|
+
call "%LIB%\git-ops.cmd" tag
|
|
175
|
+
if errorlevel 1 (
|
|
176
|
+
call "%LIB%\ui.cmd" step 17/17 "Tag %TAG_INITIAL%" "CREADO"
|
|
177
|
+
) else (
|
|
178
|
+
call "%LIB%\ui.cmd" step 17/17 "Tag %TAG_INITIAL%" "YA EXISTE"
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
call "%LIB%\ui.cmd" done
|
|
182
|
+
call :shell_if_double_click
|
|
183
|
+
endlocal
|
|
184
|
+
exit /b 0
|
|
185
|
+
|
|
186
|
+
:abort
|
|
187
|
+
call "%LIB%\ui.cmd" abort
|
|
188
|
+
call :shell_if_double_click
|
|
189
|
+
endlocal
|
|
190
|
+
exit /b 1
|
|
191
|
+
|
|
192
|
+
:shell_if_double_click
|
|
193
|
+
if "%NO_PAUSE%"=="1" goto :eof
|
|
194
|
+
echo %cmdcmdline% | find /i "%~nx0" >nul
|
|
195
|
+
if errorlevel 1 goto :eof
|
|
196
|
+
echo.
|
|
197
|
+
echo Sesion interactiva abierta. Escribe 'exit' para cerrar.
|
|
198
|
+
echo.
|
|
199
|
+
cmd /k
|
|
191
200
|
goto :eof
|