forked from knowhow/F18_knowhow
-
Notifications
You must be signed in to change notification settings - Fork 1
/
upload.cmd
69 lines (54 loc) · 1.76 KB
/
upload.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
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
setlocal enableDelayedExpansion
set CURRENT_DIR=%~dp0
echo %CURRENT_DIR%
REM get architecture x64, x32
set NODE_PROG=console.log( process.arch === "x64" ? "x64" : "x86");
echo %NODE_PROG% | node > tmpFile
set /p BUILD_ARCH= < tmpFile
del tmpFile
echo BUILD_ARCH=%BUILD_ARCH%
IF EXIST tmp (
echo delete tmp ...
%USERPROFILE%\dev\cygwin64\bin\rm -rf tmp
)
REM if NOT EXIST %USERPROFILE%\.bintray_owner (
REM echo potreban fajl %USERPROFILE%\.bintray_owner
REM goto end
REM )
REM
REM if NOT EXIST %USERPROFILE%\.bintray_api_key (
REM echo potreban fajl %USERPROFILE%\.bintray_api_key
REM goto end
REM )
REM
REM set /p BINTRAY_OWNER= < %USERPROFILE%\.bintray_owner
REM set /p BINTRAY_API_KEY= < %USERPROFILE%\.bintray_api_key
echo USERPROFILE=%USERPROFILE%
set HARBOUR_ROOT=%USERPROFILE%\harbour\%BUILD_ARCH%\harbour
echo %HARBOUR_ROOT%
call build_zip.cmd
set F18_PACKAGE=F18-windows-%BUILD_ARCH%
set NODE_PROG=const json=require('./package.json') ; console.log(json.f18)
echo %NODE_PROG% | node > tmpFile
set /p F18_VERSION= < tmpFile
del tmpFile
REM F18-windows-x64_4.20.0.zip
set ZIP_FILE=%F18_PACKAGE%_%F18_VERSION%.zip
set HOST=192.168.168.251
set DIR=/var/www/html/F18/
echo scp %ZIP_FILE% root@%HOST%:%DIR%
scp -i %USERPROFILE%\.ssh\id_rsa %ZIP_FILE% root@%HOST%:%DIR%
ssh -i %USERPROFILE%\.ssh\id_rsa root@%HOST% chmod +r %DIR%/%ZIP_FILE%
set HOST=192.168.168.252
echo scp %ZIP_FILE% root@%HOST%:%DIR%
scp -i %USERPROFILE%\.ssh\id_rsa %ZIP_FILE% root@%HOST%:%DIR%
ssh -i %USERPROFILE%\.ssh\id_rsa root@%HOST% chmod +r %DIR%/%ZIP_FILE%
if EXIST %CURRENT_DIR%tmp\nul (
REM echo rm -rf %CURRENT_DIR%tmp
del /s tmp
) else (
echo dir %CURRENT_DIR%tmp not exists
)
:end
echo kraj