Created
July 17, 2019 00:11
-
-
Save jacopomaroli/36639202f47331412139869c812d3c75 to your computer and use it in GitHub Desktop.
a small script for testing purposes to build all the usbip-win versions between two commit ashes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: place this script next to a folder named usbip-win containing the git project and a folder builds which will contain the output | |
:: e5e0d9c66144470c01861b25a853c1118a496779..2e0fae5de8177e47b3bfda8a939177dd784572eb full | |
:: e5e0d9c66144470c01861b25a853c1118a496779..28bf3b91a15e70fdf3f11b0b0eebe09feb0e54d6 test | |
@echo off | |
setlocal enableDelayedExpansion | |
set MSBuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" | |
set sz="C:\Program Files\7-Zip\7z.exe" | |
cd usbip-win | |
set hashCnt=0 | |
for /f "eol=: delims=" %%F in ('git rev-list --ancestry-path e5e0d9c66144470c01861b25a853c1118a496779..2e0fae5de8177e47b3bfda8a939177dd784572eb') do ( | |
set "hash[!hashCnt!]=%%F" | |
set /a hashCnt+=1 | |
) | |
set /a hashCnt-=1 | |
for /l %%n in (0 1 %hashCnt%) do ( | |
echo !hash[%%n]! | |
DEL /F/Q/S %~dp0\usbip-win\Debug > NUL | |
git checkout !hash[%%n]! | |
%MSBuild% %~dp0\usbip-win\usbip_win.sln /m /property:LatestTargetPlatformVersion=10.0.17134.0 | |
cd Debug\x64 | |
copy USBIPEnum\usbipenum.cat usbipenum.cat | |
copy usbip_vhci\usbip_vhci.cat usbip_vhci.cat | |
%sz% a ..\..\..\builds\!hash[%%n]!.zip usbip_vhci.sys usbip_vhci.inf usbip.exe USBIPEnum.sys USBIPEnum.inf usbipenum.cat usbip_vhci.cat | |
cd ..\.. | |
) | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
your script is interesting and impressive!
But I’ll struggle with HEAD revision.
Previous revisions older than recent revisions have too many complicated modifications!