forked from codebude/QRCoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyGet.bat
60 lines (44 loc) · 2.4 KB
/
MyGet.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo Off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=1.3.4
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)
echo Working dir: %cd%
echo Create template folders
mkdir Build
mkdir Build\lib
mkdir Build\lib\net35
mkdir Build\lib\net40
mkdir Build\lib\netcore
mkdir Build\lib\netstandard2.0
echo Compile single projects
"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild" QRCoder\QRCoder.csproj /p:Configuration="%config%";VisualStudioVersion=14.0 /tv:14.0 /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false /t:Rebuild
copy "QRCoder\bin\%config%\net35\*.dll" "Build\lib\net35"
del /F /S /Q "QRCoder\bin"
del /F /S /Q "QRCoder\obj"
"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild" QRCoder\QRCoder.NET40.csproj /p:Configuration="%config%";VisualStudioVersion=14.0 /tv:14.0 /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false /t:Rebuild
copy "QRCoder\bin\%config%\net40\*.dll" "Build\lib\net40"
del /F /S /Q "QRCoder\bin"
del /F /S /Q "QRCoder\obj"
"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild" QRCoder\QRCoderProject.Portable.csproj /p:Configuration="%config%";VisualStudioVersion=14.0 /tv:14.0 /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false /t:Rebuild
copy "QRCoder\bin\%config%\netcore\*.dll" "Build\lib\netcore"
del /F /S /Q "QRCoder\bin"
del /F /S /Q "QRCoder\obj"
dotnet build /p:Configuration="%config%" QRCoder\QRCoder.NETCore20.csproj
copy "QRCoder\bin\%config%\netstandard2.0\*.dll" "Build\lib\netstandard2.0"
del /F /S /Q "QRCoder\bin"
del /F /S /Q "QRCoder\obj"
echo Assembly information
powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\Build\lib\net35\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "Build\lib\net35\QRCoder.dll" md5
powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\Build\lib\net40\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "Build\lib\net40\QRCoder.dll" md5
powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\Build\lib\netcore\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "Build\lib\netcore\QRCoder.dll" md5
powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\Build\lib\netstandard2.0\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "Build\lib\netstandard2.0\QRCoder.dll" md5
call %NuGet% pack "QRCoder.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"