Integrate copy-binary-ps1 script

This commit is contained in:
Jonathan Jenne 2024-01-31 10:05:28 +01:00
parent c3fccc3c20
commit 9ac9895ed4
17 changed files with 68 additions and 13 deletions

View File

@ -147,6 +147,6 @@
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' }"</PostBuildEvent> <PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -119,9 +119,9 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Encryption\Encryption.vbproj"> <ProjectReference Include="..\Encryption\NNEncryption.vbproj">
<Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project> <Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project>
<Name>Encryption</Name> <Name>NNEncryption</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj"> <ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project> <Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
@ -129,4 +129,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -146,9 +146,9 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Encryption\Encryption.vbproj"> <ProjectReference Include="..\Encryption\NNEncryption.vbproj">
<Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project> <Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project>
<Name>Encryption</Name> <Name>NNEncryption</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj"> <ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project> <Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
@ -164,4 +164,7 @@
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" /> <Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target> </Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" /> <Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -314,4 +314,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -70,7 +70,7 @@ Public Class ActiveDirectoryInterface
_logger.Debug("Synced {0} users to MSSQLServer", oSyncedUsersMSSQL.Count) _logger.Debug("Synced {0} users to MSSQLServer", oSyncedUsersMSSQL.Count)
End If End If
Else Else
_logger.Debug("SyncUsersForGroup: _mssql is nothing. ") _logger.Debug("SyncUsersForGroup: _mssql is nothing.")
End If End If
Return oUsers Return oUsers

View File

@ -169,4 +169,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -138,4 +138,7 @@
<Reference Include="System.XML.Linq" /> <Reference Include="System.XML.Linq" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -116,4 +116,7 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -151,4 +151,7 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -11,13 +11,13 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Database", "Database\Databa
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMI.API", "EDMIAPI\EDMI.API.vbproj", "{25017513-0D97-49D3-98D7-BA76D9B251B0}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDMI.API", "EDMIAPI\EDMI.API.vbproj", "{25017513-0D97-49D3-98D7-BA76D9B251B0}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Encryption", "Encryption\Encryption.vbproj", "{8A8F20FC-C46E-41AC-BEE7-218366CFFF99}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NNEncryption", "Encryption\NNEncryption.vbproj", "{8A8F20FC-C46E-41AC-BEE7-218366CFFF99}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Interfaces", "Interfaces\Interfaces.vbproj", "{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Interfaces", "Interfaces\Interfaces.vbproj", "{AB6F09BF-E794-4F6A-94BB-C97C0BA84D64}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Jobs", "Jobs\Jobs.vbproj", "{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Jobs", "Jobs\Jobs.vbproj", "{39EC839A-3C30-4922-A41E-6B09D1DDE5C3}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "License", "License\License.vbproj", "{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NNLicense", "License\NNLicense.vbproj", "{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging", "Logging\Logging.vbproj", "{903B2D7D-3B80-4BE9-8713-7447B704E1B0}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging", "Logging\Logging.vbproj", "{903B2D7D-3B80-4BE9-8713-7447B704E1B0}"
EndProject EndProject

View File

@ -153,4 +153,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -173,4 +173,7 @@
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -154,4 +154,11 @@
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -142,4 +142,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>
</PropertyGroup>
</Project> </Project>

View File

@ -1,11 +1,29 @@
param( param(
[String]$SourcePath, [String]$SourcePath,
[String]$FileName, [String]$FileName,
[String]$Configuration [String]$Configuration,
[String]$ProjectName
) )
if ($Configuration -eq "Release") { $ArchiveFolderName = "Archiv"
$DestinationPath = "P:\Install .Net\0 DD - Bibliotheken\Modules\$FileName" $DestinationPath = "P:\Install .Net\0 DD - Bibliotheken\Modules\$ProjectName\"
Copy-Item $SourcePath -Destination $DestinationPath $DestinationFilePath = [IO.Path]::Combine($DestinationPath, $FileName)
} $ArchiveBasePath = [IO.Path]::Combine($DestinationPath, $ArchiveFolderName)
if ($Configuration -eq "Release") {
$DateFolderName = $((Get-Date).ToString('yyyy-MM-dd_hh-mm'))
$ArchivePath = [IO.Path]::Combine($ArchiveBasePath, $DateFolderName)
if (!(Test-Path -Path $ArchiveBasePath)) {
New-Item -Path $ArchiveBasePath -Type Directory
}
if (Test-Path -Path $DestinationFilePath) {
if (!(Test-Path -Path $ArchivePath)) {
New-Item -Path $ArchivePath -Type Directory
}
Copy-Item $DestinationFilePath -Destination $ArchivePath
}
Copy-Item $SourcePath -Destination $DestinationFilePath
}