forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload_bintray_win32.bat
41 lines (29 loc) · 1.46 KB
/
upload_bintray_win32.bat
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
@echo off
REM BINTRAY_API_KEY=${BINTRAY_API_KEY:-`cat bintray_api_key`}
set BINTRAY_OWNER=bringout
set BINTRAY_REPOS=eShell
set BINTRAY_PACKAGE=eShell-windows-%BINTRAY_ARCH%
set CURL=curl.exe
set NODE_PROG=const json=require('./package.json') ; console.log(json.version)
echo %NODE_PROG% | node > tmpFile
set /p BINTRAY_PACKAGE_VER= < tmpFile
del tmpFile
REM x64
IF [%BINTRAY_ARCH%] EQU [x64] move .build\win32-x64\user-setup\eShellSetup.exe eShellSetup-x64-%BINTRAY_PACKAGE_VER%.exe
IF [%BINTRAY_ARCH%] EQU [x64] set FILE=eShellSetup-x64-%BINTRAY_PACKAGE_VER%.exe
REM x86
IF [%BINTRAY_ARCH%] NEQ [x64] move .build\win32-ia32\user-setup\eShellSetup.exe eShellSetup-x86-%BINTRAY_PACKAGE_VER%.exe
IF [%BINTRAY_ARCH%] NEQ [x64] set FILE=eShellSetup-x86-%BINTRAY_PACKAGE_VER%.exe
echo "======================== package: %BINTRAY_PACKAGE% ========== package_ver: %BINTRAY_PACKAGE_VER% =================="
REM EXE=`ls eShellSetup.exe`
REM zip -r -v $FILE $EXE
dir %FILE%
echo uploading %FILE% to bintray ...
%CURL% -s -T %FILE% ^
-u %BINTRAY_OWNER%:%BINTRAY_API_KEY% ^
--header "X-Bintray-Override: 1" ^
--header "X-Bintray-Publish: 1" ^
https://api.bintray.com/content/%BINTRAY_OWNER%/%BINTRAY_REPOS%/%BINTRAY_PACKAGE%/%BINTRAY_PACKAGE_VER%/%FILE%
%CURL% -s -u %BINTRAY_OWNER%:%BINTRAY_API_KEY% ^
-X POST https://api.bintray.com/content/%BINTRAY_OWNER%/%BINTRAY_REPOS%/%BINTRAY_PACKAGE%/%BINTRAY_PACKAGE_VER%/publish
echo upload_bintray_win32 kraj ...