Skip to content

Commit

Permalink
Dynamo configuration change of T4 transformation (#10837)
Browse files Browse the repository at this point in the history
* Changes to AssemblyInfoGenerator project to include T4 task on CICD pipeline and change on build.xml to put the Nuget.exe path as a parameter

* Update AssemblyInfoGenerator.csproj
  • Loading branch information
alfredo-pozo authored Jul 2, 2020
1 parent af43ba9 commit 7f2c8ed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 53 deletions.
12 changes: 11 additions & 1 deletion src/AssemblySharedInfoGenerator/AssemblyInfoGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,18 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!--Checking if the Text Template transform is installed with VS IDE so it is only for Dev machines-->
<Import Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v16.0\TextTemplating\Microsoft.TextTemplating.targets')" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v16.0\TextTemplating\Microsoft.TextTemplating.targets" />
<!--Checking if the Text Template transform is installed from ADSK artifactory for build hosts-->
<Import Condition="Exists('..\..\extern\TextTemplating.BuildTasks\TextTemplating.BuildTasks.targets')" Project="..\..\extern\TextTemplating.BuildTasks\TextTemplating.BuildTasks.targets" />
<PropertyGroup>
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">"$(SolutionDir)transform_all.bat" "$(ProjectDir)"</PreBuildEvent>
<TransformOnBuild>true</TransformOnBuild>
</PropertyGroup>
<PropertyGroup>
<OverwriteReadOnlyOutputFiles>true</OverwriteReadOnlyOutputFiles>
</PropertyGroup>
<PropertyGroup>
<TransformOutOfDateOnly>false</TransformOutOfDateOnly>
</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.
Expand Down
5 changes: 3 additions & 2 deletions src/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
DefaultTargets="Build">
<PropertyGroup>
<Solution>Dynamo.All.sln</Solution>
<NuGetPath>$(MSBuildProjectDirectory)\..\tools\Nuget\NuGet.exe</NuGetPath>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,8 +18,8 @@
</Target>

<Target Name="RestorePackages">
<Exec Command="powershell.exe -ExecutionPolicy ByPass -Command Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $(MSBuildProjectDirectory)\..\tools\Nuget\NuGet.exe" />
<Exec Command="$(MSBuildProjectDirectory)\..\tools\Nuget\NuGet.exe restore $(Solution)"/>
<Exec Condition="!Exists($(NuGetPath))" Command="powershell.exe -ExecutionPolicy ByPass -Command Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $(NuGetPath)" />
<Exec Command="$(NuGetPath) restore $(Solution)"/>
</Target>

</Project>
50 changes: 0 additions & 50 deletions src/transform_all.bat

This file was deleted.

0 comments on commit 7f2c8ed

Please sign in to comment.