-
Notifications
You must be signed in to change notification settings - Fork 146
/
dropout.cmd
56 lines (39 loc) · 1.32 KB
/
dropout.cmd
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
@echo off
setlocal
SET FEATURE_NAME=%1
if NOT DEFINED FEATURE_NAME (
echo.
echo Must specify feature name as first argument
echo.
goto :error
)
SET ACCOUNT_NAME=%2
if NOT DEFINED ACCOUNT_NAME (
SET ACCOUNT_NAME=mseng
)
SET DROP_CONTENT_DIR=%3
if NOT DEFINED DROP_CONTENT_DIR (
set DROP_CONTENT_DIR="%~dp0\out\bin"
)
if DROP_CONTENT_DIR == ' ' (
set DROP_CONTENT_DIR="%~dp0\out\bin"
)
SET USE_FEATURE_NAME=%4
if DEFINED USE_FEATURE_NAME (
SET DROP_NAME=%FEATURE_NAME%
)
if NOT DEFINED DROP_NAME (
SET DROP_NAME=%USERNAME%/%FEATURE_NAME%
)
echo Creating drop %DROP_NAME%
echo https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection/_apis/drop/drops/%DROP_NAME%
call %~dp0\drop.cmd create -a -s https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection -n "%DROP_NAME%"
call %~dp0\drop.cmd publish -a -s https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection -n "%DROP_NAME%" -d %DROP_CONTENT_DIR%
call %~dp0\drop.cmd finalize -a -s https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection -n "%DROP_NAME%"
echo Created drop %DROP_NAME%
echo https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection/_apis/drop/drops/%DROP_NAME%
:error
if %ERRORLEVEL% NEQ 0 (
endlocal && exit /b 1
)
endlocal && exit /b 0