Skip to content
Snippets Groups Projects
Commit c0cfd24a authored by Michael Mell's avatar Michael Mell
Browse files

Use Post-Build-Script.ps1 to reset changes to BuildDetails.cs

parent 0131c266
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,9 @@
<PropertyGroup>
<PreBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)Scripts\Prepare-Build.ps1 -SolutionDir $(SolutionDir) -ConfigurationName $(ConfigurationName)</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)Scripts\Post-Build-Script.ps1 -SolutionDir $(SolutionDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
......
......@@ -69,4 +69,7 @@
<PropertyGroup>
<PreBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)Scripts\Prepare-Build.ps1 -SolutionDir $(SolutionDir) -ConfigurationName $(ConfigurationName)</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)Scripts\Post-Build-Script.ps1 -SolutionDir $(SolutionDir)</PostBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -171,8 +171,7 @@
<PreBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)Scripts\Prepare-Build.ps1 -SolutionDir $(SolutionDir) -ConfigurationName $(ConfigurationName)</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PostBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)Scripts\Post-Build-Script.ps1 -SolutionDir $(SolutionDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
......@@ -116,8 +116,7 @@
<PreBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)Scripts\Prepare-Build.ps1 -SolutionDir $(SolutionDir) -ConfigurationName $(ConfigurationName)</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PostBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)Scripts\Post-Build-Script.ps1 -SolutionDir $(SolutionDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
<#
.DESCRIPTION
This script is intended to be executed as a "post-build" command in Visual Studio.
It reverts changes made to specific files during the build process, ensuring they
remain consistent with their pre-build state.
Currently, it targets the "BuildDetails.cs" file within the "ATxCommon"
directory of the specified solution.
#>
[CmdletBinding(DefaultParameterSetName="build")]
Param(
[Parameter(Mandatory=$True, ParameterSetName="build")]
[Parameter(Mandatory=$True, ParameterSetName="gentemplate")]
[string] $SolutionDir
)
try {
git checkout -- "$($SolutionDir)\ATxCommon\BuildDetails.cs"
} catch {
Write-Error "Git checkout failed. Is Git installed? File was not reset: $($SolutionDir)\ATxCommon\BuildDetails.cs"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment