32 lines
836 B
Batchfile
32 lines
836 B
Batchfile
@echo off
|
|
setlocal EnableExtensions
|
|
|
|
set "ROOT=%~dp0.."
|
|
set "ARTIFACTS=%ROOT%\artifacts"
|
|
set "ZIP=%ARTIFACTS%\BizTalkApplicationCatalog-source.zip"
|
|
set "TEXT=%ZIP%.txt"
|
|
|
|
if not exist "%ARTIFACTS%" mkdir "%ARTIFACTS%"
|
|
if exist "%ZIP%" del /q "%ZIP%"
|
|
if exist "%TEXT%" del /q "%TEXT%"
|
|
|
|
where tar >nul 2>nul
|
|
if errorlevel 1 (
|
|
echo FEHLER: tar.exe wird fuer das Quellarchiv benoetigt.
|
|
exit /b 2
|
|
)
|
|
|
|
pushd "%ROOT%"
|
|
tar.exe -a -c -f "%ZIP%" --exclude=.git --exclude=bin --exclude=obj --exclude=artifacts .
|
|
set "TAR_EXIT=%ERRORLEVEL%"
|
|
popd
|
|
if not "%TAR_EXIT%"=="0" exit /b %TAR_EXIT%
|
|
|
|
certutil -f -encode "%ZIP%" "%TEXT%" >nul
|
|
if errorlevel 1 exit /b %ERRORLEVEL%
|
|
|
|
echo Quellarchiv: %ZIP%
|
|
echo Base64-Text: %TEXT%
|
|
echo Dekodieren: certutil -decode BizTalkApplicationCatalog-source.zip.txt BizTalkApplicationCatalog-source.zip
|
|
exit /b 0
|