Added upload to sourceforge.
This commit is contained in:
parent
5800c23989
commit
9ecf4c27fb
@ -8,6 +8,12 @@ clone_depth: 1
|
|||||||
platform:
|
platform:
|
||||||
- x64
|
- x64
|
||||||
|
|
||||||
|
environment:
|
||||||
|
sf_secret:
|
||||||
|
secure: 8QOHSPQLI/lmjgOhyGOsMA5MxOdeSnlFWWKjntqEfBMfW/XCuiEk5tHNjZiiAw8N
|
||||||
|
sf_api:
|
||||||
|
secure: S4qrbAdLq3Hw5yozC7XAavTGzpPPh8MleX+r8kaueBtPZUeJGt+8EoqaPw0P1PzV
|
||||||
|
|
||||||
init:
|
init:
|
||||||
- if /i %APPVEYOR_REPO_TAG% == true set WITH_TESSDATA=1
|
- if /i %APPVEYOR_REPO_TAG% == true set WITH_TESSDATA=1
|
||||||
|
|
||||||
@ -15,6 +21,8 @@ cache:
|
|||||||
- installed -> scripts\win\prepare.bat
|
- installed -> scripts\win\prepare.bat
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
- cinst winscp
|
||||||
|
- nuget install secure-file -ExcludeVersion
|
||||||
- call "scripts\win\prepare.bat"
|
- call "scripts\win\prepare.bat"
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
@ -33,3 +41,7 @@ deploy:
|
|||||||
force_update: true
|
force_update: true
|
||||||
on:
|
on:
|
||||||
appveyor_repo_tag: true
|
appveyor_repo_tag: true
|
||||||
|
|
||||||
|
after_deploy:
|
||||||
|
- secure-file\tools\secure-file -decrypt scripts\win\sf_key.av -secret %sf_secret% -out scripts\win\sf_key
|
||||||
|
- call "scripts\win\deploy_sf.bat"
|
||||||
|
26
scripts/win/deploy_sf.bat
Normal file
26
scripts/win/deploy_sf.bat
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
set PATH=c:\Program Files (x86)\WinSCP\;%PATH%
|
||||||
|
|
||||||
|
set SELF_PATH=%~dp0
|
||||||
|
set ROOT=%SELF_PATH%\..\..
|
||||||
|
|
||||||
|
|
||||||
|
for /f "delims=" %%i in ('findstr versionString %ROOT%\version.json') do set VERSION_LINE=%%i
|
||||||
|
set UNQUOTED=%VERSION_LINE:"='%
|
||||||
|
for /f "tokens=4 delims='" %%i in ("%UNQUOTED%") do set VERSION=%%i
|
||||||
|
|
||||||
|
for /f "delims=" %%i in ('dir /b screen-translator-online*.exe') do set online=%%i
|
||||||
|
for /f "delims=" %%i in ('dir /b screen-translator-offline*.exe') do set offline=%%i
|
||||||
|
|
||||||
|
|
||||||
|
winscp.com /keygen %SELF_PATH%\sf_key /output=key.ppk
|
||||||
|
set folder="/home/frs/project/screen-translator/bin/v%VERSION%"
|
||||||
|
winscp.com /command "open sftp://onemoregres@frs.sourceforge.net/ -privatekey=key.ppk -hostkey=*" "mkdir %folder%" "put %online% %folder%/%online%" "put %offline% %folder%/%offline%" "exit"
|
||||||
|
|
||||||
|
|
||||||
|
set url="https://sourceforge.net/projects/screen-translator/files/bin/v%VERSION%/%online%"
|
||||||
|
curl --insecure -H "Accept: application/json" -X PUT -d "default=windows" -d "api_key=%sf_api%" %url%
|
||||||
|
|
||||||
|
set url="https://sourceforge.net/projects/screen-translator/files/bin/v%VERSION%/%offline%"
|
||||||
|
curl --insecure -H "Accept: application/json" -X PUT -d "default=windows" -d "api_key=%sf_api%" %url%
|
BIN
scripts/win/sf_key.av
Normal file
BIN
scripts/win/sf_key.av
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user