-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathminicoin.cmd
More file actions
51 lines (44 loc) · 997 Bytes
/
Copy pathminicoin.cmd
File metadata and controls
51 lines (44 loc) · 997 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
50
51
@echo off
set "MINICOIN_PROJECT_DIR=%cd%"
setlocal enabledelayedexpansion
set "minicoin_dir=%~dp0"
set error=0
cd "%minicoin_dir%"
if "%1" == "update" (
shift
goto :update
)
if "%1" == "help" (
goto :help
)
call vagrant %*
set error=%errorlevel%
goto :end
:update
git fetch --all --tags 2> NUL > NUL
if not !errorlevel! == 0 (
>&2 echo Failed to fetch tags, can't update minicoin!
set error=!errorlevel!
goto :end
)
if "%1" == "" (
FOR /F "tokens=* USEBACKQ" %%F IN (`"git tag --list --sort=-taggerdate"`) DO (
if not defined minicoin_version set "minicoin_version=%%F"
)
) else (
set "minicoin_version=%1"
)
if not "%minicoin_version%" == "" (
echo Checking out version %minicoin_version%
git stash > NUL
git checkout %minicoin_version% 2> NUL > NUL
git checkout master -- ..\setup.cmd minicoin.cmd 2> NUL > NUL
)
goto :end
:help
type help.txt
goto :end
:end
cd "%MINICOIN_PROJECT_DIR%"
set MINICOIN_PROJECT_DIR=
exit /B %error%