-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.cmd
More file actions
49 lines (39 loc) · 981 Bytes
/
deploy.cmd
File metadata and controls
49 lines (39 loc) · 981 Bytes
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
@echo off
title Deploy automatizado
color a
REM VALIDANDO SE O DIRETÒRIO ATUAL TEM A EXTENSÂO .GIT
echo %cd% | find /i ".git" && cls
if %errorlevel% equ 0 (
msg /w * "Muito bem vamos comecar !"
) else (
msg /w * "O nome do diretorio deve terminar com a extensao .git"
exit 1
)
REM INICIALIZANDO O GIT
git init
msg /w * Sucesso na inicializacao!
timeout 1
REM CRIANDO README
copy NUL README.md
echo README.md >>README.md
msg /w * README criado !
timeout 1
REM CRIANDO GITIGNORE
REM copy NUL .gitignore
REM msg /w * GITIGNORE criado !
REM ADICIOANDO ARQUIVOS
git add .
msg /w * Arquivos adicionados !
timeout 1
REM COMITANDO ARQUIVOS
git commit -m "Deploy automatizado via batch file"
msg /w * Arquivos commitados !
timeout 1
REM SOLICITANDO ENDEREÇO
set /p repositorio="Digite o endereco para envio >"
git remote add origin %repositorio%
msg /w * Adicionado ao repositorio !
REM ENVIANDO ARQUIVOS
git push -u origin master
msg /w * Arquivos enviados !
pause