REM REM Licensed to the Apache Software Foundation (ASF) under one or more REM contributor license agreements. See the NOTICE file distributed with REM this work for additional information regarding copyright ownership. REM The ASF licenses this file to You under the Apache License, Version 2.0 REM (the "License"); you may not use this file except in compliance with REM the License. You may obtain a copy of the License at REM REM http://www.apache.org/licenses/LICENSE-2.0 REM REM Unless required by applicable law or agreed to in writing, software REM distributed under the License is distributed on an "AS IS" BASIS, REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM See the License for the specific language governing permissions and REM limitations under the License. REM @echo off setlocal set TAR_EXEC=C:\Users\aphillips\Downloads\TarTool\TarTool.exe set FCIV_EXEC=C:\Users\aphillips\Downloads\fciv.exe set GPG_EXEC=C:\Program Files (x86)\GnuPG\gpg.exe set SED_EXEC=C:\Users\aphillips\Downloads\sed\sed.exe if [%1]==[] ( echo Usage: verify-jclouds ^ [release-version] exit /b 1 ) set DIST_DIR=%1 if not [%2]==[] ( set RELEASE_VERSION=%2 ) else ( for /f "delims=- tokens=1" %%i in ("%1") do set RELEASE_VERSION=%%i ) echo Release version: %RELEASE_VERSION% echo Downloading release dists set SVN_DIR=https://dist.apache.org/repos/dist/dev/jclouds/%1 svn export %SVN_DIR% if ERRORLEVEL 1 ( echo ERROR: Unable to download distributions from "%SVN_DIR%" exit /b 1 ) cd "%1" set LOGFILE=checksums.txt for %%i in (*.tar.gz) do ( echo Verifying "%%i" echo ## %%i >> "%LOGFILE%" echo --- >> "%LOGFILE%" "%GPG_EXEC%" --verify %%i.asc >> "%LOGFILE%" 2>&1 echo. >> "%LOGFILE%" echo. >> "%LOGFILE%" echo SHA >> "%LOGFILE%" "%FCIV_EXEC%" -sha512 %%i >> "%LOGFILE%" type %%i.sha512 >> "%LOGFILE%" echo. >> "%LOGFILE%" echo. >> "%LOGFILE%" echo Untarring "%%i" "%TAR_EXEC%" %%i . ) set ARCHIVES_LOGFILE=archives.txt for /D %%i in (jclouds*) do ( echo Seaching in %%i >> "%ARCHIVES_LOGFILE%" for %%j in (.jar,.bin,.zip,.tar.gz) do ( echo Seaching for %%j... >> "%ARCHIVES_LOGFILE%" dir /S /B %%i\*%%j >> "%ARCHIVES_LOGFILE%" 2>&1 ) ) echo Preparing clean Maven environment ren "%USERPROFILE%"\.m2\repository repository_orig ren "%USERPROFILE%"\.m2\settings.xml settings.xml.orig dir "%USERPROFILE%"\.m2\ set MAVEN_LOGFILE=maven-log.txt cmd /c mvn --version >> "%MAVEN_LOGFILE%" echo. >> "%MAVEN_LOGFILE%" echo. >> "%MAVEN_LOGFILE%" for %%j in (jclouds,jclouds-labs,jclouds-labs-aws,jclouds-labs-openstack) do ( if exist "%%j-%RELEASE_VERSION%" ( echo Building "%%j" echo ## %%j >> "%MAVEN_LOGFILE%" echo --- >> "%MAVEN_LOGFILE%" cmd /c mvn clean install -Dmaven.javadoc.skip=true -f ".\%%j-%RELEASE_VERSION%\pom.xml" >> "%MAVEN_LOGFILE%" 2>&1 if ERRORLEVEL 1 echo WARN: Failure in "%%j" echo. >> "%MAVEN_LOGFILE%" echo. >> "%MAVEN_LOGFILE%" ) ) echo Checking examples set EXAMPLE_LOGFILE=example-log.txt cmd /c git clone https://github.com/jclouds/jclouds-examples.git >> %EXAMPLE_LOGFILE% 2>&1 pushd .\jclouds-examples\blobstore-basics "%SED_EXEC%" s/^org\.jclouds/^org\.apache\.jclouds/g pom.xml | "%SED_EXEC%" s/^.*^<\/jclouds\.version^>/^%RELEASE_VERSION%^<\/jclouds\.version^>/g > pom-processed.xml popd cmd /c mvn clean package -f ./jclouds-examples/blobstore-basics/pom-processed.xml >> %EXAMPLE_LOGFILE% 2>&1 dir .\jclouds-examples\blobstore-basics\target echo Restoring Maven environment ren "%USERPROFILE%"\.m2\repository repository_jclouds_verification ren "%USERPROFILE%"\.m2\repository_orig repository ren "%USERPROFILE%"\.m2\settings.xml.orig settings.xml dir "%USERPROFILE%"\.m2\ endlocal