-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsrv.create.bat
More file actions
37 lines (29 loc) · 1.08 KB
/
srv.create.bat
File metadata and controls
37 lines (29 loc) · 1.08 KB
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
::! Copyright (c) 2017 Denis Kuzmin <x-3F@outlook.com> github/3F
::! Copyright (c) hMSBuild contributors https://github.com/3F/hMSBuild/graphs/contributors
::! Licensed under the MIT License (MIT).
::! See accompanying License.txt file or visit https://github.com/3F/hMSBuild
@echo off
if not exist hMSBuild.bat exit /B1
set /p _version=<"%~dp0.version"
if not defined _version exit /B1
set "tpldir=%temp%\hMSBuild.%~nx0.%random%%random%"
set "tplnupkg=%tpldir%\hMSBuild.%_version%.nupkg"
set "dstdir=%~dp0hMSBuild"
set srv="%dstdir%\%_version%"
if exist %srv% (
del /F/Q %srv% >nul
rmdir /S/Q "%dstdir%" 2>nul>nul
)
call "%~dp0\hMSBuild" -GetNuTool /t:pack /p:ngin="%~dp0/";ngout="%tpldir%/" >nul
if not exist "%tplnupkg%" exit /B2
mkdir "%dstdir%" 2>nul>nul
copy /Y/B/V "%tplnupkg%" %srv% >nul
del /F/Q "%tplnupkg%" >nul
rmdir /Q "%tpldir%" >nul
echo.
echo Ready... use it like:
echo hMSBuild -GetNuTool *hMSBuild/%_version% /p:ngserver=.\
echo.
echo Built-in GetNuTool. Syntax and relevant documentation:
echo hMSBuild -GetNuTool -help
echo hMSBuild -GetNuTool ~/p:use=documentation