Skip to content

upload win, osx, and linux installers to azure sdk team storage account #1521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions tools/CLU/UploadOrDownloadInstaller.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,37 @@ set action=%1
set storageUrl=%2
set key=%3
set downloadFolder=%4
set dropBaseName=ubuntu.14.04-x64
set archiveFileName=%dropBaseName%.latest.tar
set archive=%root%\drop\%archiveFileName%

if "%1" == "upload" (
del /Q /F %root%\drop\*.gz
%~dp0\7-Zip\7z.exe a -ttar -so %archive% %root%\drop\clurun\ubuntu.14.04-x64 | %~dp0\7-Zip\7z.exe a -si %archive%.gz
del /Q /F %root%\drop\*.tar.*
%~dp0\7-Zip\7z.exe a -ttar -so %root%\drop\ubuntu.14.04-x64.latest.tar %root%\drop\clurun\ubuntu.14.04-x64 | %~dp0\7-Zip\7z.exe a -si %root%\drop\ubuntu.14.04-x64.latest.tar.gz
if ERRORLEVEL 1 (
echo failed to create tar.gz file "%archive%.gz"
echo failed to create tar.gz file ubuntu.14.04-x64.latest.tar.gz
exit /B 1
)
%~dp0\AzCopy\AzCopy.exe /Source:%root%\drop /Dest:%storageUrl% /DestKey:%key% /Pattern:%archiveFileName%.gz /Y

%~dp0\7-Zip\7z.exe a -ttar -so %root%\drop\win7-x64.latest.tar %root%\drop\clurun\win7-x64 | %~dp0\7-Zip\7z.exe a -si %root%\drop\win7-x64.latest.tar.gz
if ERRORLEVEL 1 (
echo failed to upload installers from "%root%\drop\%archiveFileName%.gz" to "%storageUrl%"
echo failed to create tar.gz file win7-x64.latest.tar.gz
exit /B 1
)

%~dp0\7-Zip\7z.exe a -ttar -so %root%\drop\osx.10.10-x64.latest.tar %root%\drop\clurun\osx.10.10-x64 | %~dp0\7-Zip\7z.exe a -si %root%\drop\osx.10.10-x64.latest.tar.gz
if ERRORLEVEL 1 (
echo failed to create tar.gz file osx.10.10-x64.latest.tar.gz
exit /B 1
)

%~dp0\AzCopy\AzCopy.exe /Source:%root%\drop /Dest:%storageUrl% /DestKey:%key% /Pattern:*.tar.gz /Y
if ERRORLEVEL 1 (
echo failed to upload installers from "%root%\drop" to "%storageUrl%"
exit /B 1
)
)

if "%1" == "download" (
echo download the latest installer
%~dp0\AzCopy\AzCopy.exe /Source:%storageUrl% /SourceKey:%key% /Dest:%downloadFolder% /Pattern:%archiveFileName%.gz /Y /S
%~dp0\AzCopy\AzCopy.exe /Source:%storageUrl% /SourceKey:%key% /Dest:%downloadFolder% /Pattern:*.gz /Y /S
if ERRORLEVEL 1 (
echo failed to download installers from "%storageUrl%" to "%downloadFolder%"
exit /B 1
Expand Down