view Snapshot.ps1 @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
line wrap: on
line source

git archive --format=zip -o C:\Temp\BLToolkitSnapshot\bltoolkit_dev.zip master

$revision = 0

git rev-list master |
Foreach-Object {
	$revision = $revision + 1
}

Write-Host "BLToolkit revision: $revision"
Write-Host ""

c:

if (!([System.IO.DirectoryInfo]"c:\temp\").Exists)                   { md c:\temp }
if (!([System.IO.DirectoryInfo]"c:\temp\BLToolkitSnapshot\").Exists) { md c:\temp\BLToolkitSnapshot }

cd c:\temp\BLToolkitSnapshot\

if (([System.IO.DirectoryInfo]"c:\temp\BLToolkitSnapshot\bl-toolkit\").Exists) {
	rd bl-toolkit\* -recurse
} else {
	md bl-toolkit
}

cd bl-toolkit

$rar = '"' + ${env:ProgramFiles(x86)} + '\WinRAR\WinRar.exe" x ..\bltoolkit_dev.zip'
cmd /c $rar

del ..\*.zip

$rev_file = '// Autogenerated. Do not modify!

namespace BLToolkit
{
	partial class BLToolkitConstants
	{
		// <summary>
		// Revision component of version.
		// <summary>
		public const string Revision = "' + $revision + '";
	}
}'

del Source\Properties\Revision.generated.cs
$rev_file >> Source\Properties\Revision.generated.cs

$rar = '"' + ${env:ProgramFiles(x86)} + '\WinRAR\WinRar.exe" a -m5 -md1024 -s -r -rr -AFzip -x*\_svn\* c:\temp\BLToolkitSnapshot\bltoolkit_dev *.*'
cmd /c $rar

$rar = '"' + ${env:ProgramFiles(x86)} + '\WinRAR\WinRar.exe" a -m5 -md1024 -s -r -rr -AFzip -x*\_svn\* c:\temp\BLToolkitSnapshot\bltoolkit Source\*.*'
cmd /c $rar

cd Source

$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.3.csproj /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.4.csproj /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.4.csproj /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.SL.4.csproj /property:Configuration=Release"
cmd /c $comp

copy bin\Release\*.dll .
md DataProviders

cd ..\Tools\BLTgen

$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLTgen.2008.csproj /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLTgen.2010.csproj /property:Configuration=Release"
cmd /c $comp

copy bin\Release\*.exe ..\..\Source

cd ..\..\DataProviders

$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.DB2.3.csproj        /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.Firebird.3.csproj   /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.Informix.3.csproj   /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.MySql.3.csproj      /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.Oracle.3.csproj     /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.PostgreSQL.3.csproj /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.SqlCe.3.csproj      /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.SQLite.3.csproj     /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v3.5\MSBuild.exe BLToolkit.Data.DataProvider.Sybase.3.csproj     /property:Configuration=Release"
cmd /c $comp

$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.DB2.4.csproj        /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.Firebird.4.csproj   /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.Informix.4.csproj   /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.MySql.4.csproj      /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.Oracle.4.csproj     /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.PostgreSQL.4.csproj /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.SqlCe.4.csproj      /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.SQLite.4.csproj     /property:Configuration=Release"
cmd /c $comp
$comp = "$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe BLToolkit.Data.DataProvider.Sybase.4.csproj     /property:Configuration=Release"
cmd /c $comp

copy bin\Release\BLToolkit.Data.*.dll ..\Source\DataProviders

cd ..\Source

$rar = '"' + ${env:ProgramFiles(x86)} + '\WinRAR\WinRar.exe" a -m5 -md1024 -s -r -rr -AFzip -x*\_svn\* -x*\bin\* -x*\obj\* c:\temp\BLToolkitSnapshot\bltoolkit_bin *.exe *.dll DataProvider\ Data\DataProvider\'
cmd /c $rar

ftp -s:e:\documents\copybltsnapshot.txt ftp.bltoolkit.net