2019-03-29 01:14:25 +03:00
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
|
|
|
|
SET FEATURE_NAME=%1
|
|
|
|
|
|
|
|
if NOT DEFINED FEATURE_NAME (
|
|
|
|
echo.
|
|
|
|
echo Must specify feature name as first argument
|
|
|
|
echo.
|
|
|
|
goto :error
|
|
|
|
)
|
|
|
|
|
2020-08-03 21:29:15 +03:00
|
|
|
SET ACCOUNT_NAME=%2
|
|
|
|
|
|
|
|
if NOT DEFINED ACCOUNT_NAME (
|
|
|
|
SET ACCOUNT_NAME=mseng
|
|
|
|
)
|
|
|
|
|
2021-12-28 06:15:21 +03:00
|
|
|
SET DROP_CONTENT_DIR=%3
|
2020-10-14 01:43:04 +03:00
|
|
|
|
2019-03-29 01:14:25 +03:00
|
|
|
if NOT DEFINED DROP_CONTENT_DIR (
|
|
|
|
set DROP_CONTENT_DIR="%~dp0\out\bin"
|
|
|
|
)
|
|
|
|
|
2022-01-08 00:59:31 +03:00
|
|
|
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%
|
|
|
|
)
|
|
|
|
|
2020-10-14 01:43:04 +03:00
|
|
|
if NOT DEFINED DROP_NAME (
|
|
|
|
SET DROP_NAME=%USERNAME%/%FEATURE_NAME%
|
|
|
|
)
|
2019-03-29 01:14:25 +03:00
|
|
|
|
|
|
|
echo Creating drop %DROP_NAME%
|
2020-08-03 21:29:15 +03:00
|
|
|
echo https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection/_apis/drop/drops/%DROP_NAME%
|
2019-03-29 01:14:25 +03:00
|
|
|
|
2020-08-03 21:29:15 +03:00
|
|
|
call %~dp0\drop.cmd create -a -s https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection -n "%DROP_NAME%"
|
2019-03-29 01:14:25 +03:00
|
|
|
|
2020-08-03 21:29:15 +03:00
|
|
|
call %~dp0\drop.cmd publish -a -s https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection -n "%DROP_NAME%" -d %DROP_CONTENT_DIR%
|
2019-03-29 01:14:25 +03:00
|
|
|
|
2020-08-03 21:29:15 +03:00
|
|
|
call %~dp0\drop.cmd finalize -a -s https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection -n "%DROP_NAME%"
|
2019-03-29 01:14:25 +03:00
|
|
|
|
|
|
|
echo Created drop %DROP_NAME%
|
2020-08-03 21:29:15 +03:00
|
|
|
echo https://%ACCOUNT_NAME%.artifacts.visualstudio.com/DefaultCollection/_apis/drop/drops/%DROP_NAME%
|
2019-03-29 01:14:25 +03:00
|
|
|
|
|
|
|
:error
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
endlocal && exit /b 1
|
|
|
|
)
|
|
|
|
|
|
|
|
endlocal && exit /b 0
|