|
22 | 22 | </PropertyGroup> |
23 | 23 |
|
24 | 24 | <Target Name="NpmRunBuild" BeforeTargets="BeforeBuild"> |
| 25 | + <PropertyGroup> |
| 26 | + <PackageVersion>1.0.19</PackageVersion> |
| 27 | + <PackageName>SplashScreen</PackageName> |
| 28 | + </PropertyGroup> |
| 29 | + <Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command echo ($(SolutionDir)\pkgexist.ps1 $(PackageName) $(PackageVersion))" ConsoleToMSBuild="true"> |
| 30 | + <Output TaskParameter="ConsoleOutput" PropertyName="ShouldInstall" /> |
| 31 | + </Exec> |
| 32 | + <Message Text="Skipping Install for $(PackageName) $(PackageVersion), package up to date." Condition="!$(ShouldInstall)" Importance="high" /> |
25 | 33 | <!--This command updates the npm registry configuration if necessary--> |
26 | | - <Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command $(SolutionDir)\setnpmreg.ps1" /> |
| 34 | + <Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command $(SolutionDir)\setnpmreg.ps1" Condition="$(ShouldInstall)"/> |
27 | 35 | <!--This command gets a specific splash screen build from npm--> |
28 | | - <Exec Command="npm pack @dynamods/splash-screen@1.0.19" /> |
| 36 | + <Exec Command="npm pack @dynamods/splash-screen@$(PackageVersion)" Condition="$(ShouldInstall)"/> |
29 | 37 | </Target> |
30 | 38 |
|
31 | | - <Target Name="ExtractTGZFile" DependsOnTargets="NpmRunBuild" BeforeTargets="BeforeBuild"> |
| 39 | + <Target Name="ExtractTGZFile" DependsOnTargets="NpmRunBuild" BeforeTargets="BeforeBuild" Condition="$(ShouldInstall)"> |
32 | 40 | <!--Locates the .tgz files--> |
33 | 41 | <ItemGroup> |
34 | 42 | <TGZFiles Include="./dynamods-splash-screen-*.tgz" /> |
|
50 | 58 |
|
51 | 59 |
|
52 | 60 | <Target Name="NpmRunBuildHomePage" BeforeTargets="BeforeBuild"> |
| 61 | + <PropertyGroup> |
| 62 | + <PackageVersion>1.0.14</PackageVersion> |
| 63 | + <PackageName>DynamoHome</PackageName> |
| 64 | + </PropertyGroup> |
| 65 | + <Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command echo ($(SolutionDir)\pkgexist.ps1 $(PackageName) $(PackageVersion))" ConsoleToMSBuild="true"> |
| 66 | + <Output TaskParameter="ConsoleOutput" PropertyName="ShouldInstall" /> |
| 67 | + </Exec> |
| 68 | + <Message Text="Skipping Install for $(PackageName) $(PackageVersion), package up to date." Condition="!$(ShouldInstall)" Importance="high"></Message> |
53 | 69 | <!--This command updates the npm registry configuration if necessary--> |
54 | | - <Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command $(SolutionDir)\setnpmreg.ps1" /> |
| 70 | + <Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command $(SolutionDir)\setnpmreg.ps1" Condition="$(ShouldInstall)"/> |
55 | 71 | <!--Download a specific build of the Dynamo Home package from npm--> |
56 | | - < Exec Command= "npm pack @dynamods/[email protected]" /> |
| 72 | + < Exec Command= "npm pack @dynamods/[email protected]" Condition="$(ShouldInstall)"/> |
57 | 73 | </Target> |
58 | 74 |
|
59 | | - <Target Name="ExtractTGZFileDynamoHome" DependsOnTargets="NpmRunBuildHomePage" BeforeTargets="BeforeBuild"> |
| 75 | + <Target Name="ExtractTGZFileDynamoHome" DependsOnTargets="NpmRunBuildHomePage" BeforeTargets="BeforeBuild" Condition="$(ShouldInstall)"> |
60 | 76 | <!--Locate the .tgz files for the Dynamo Home package--> |
61 | 77 | <ItemGroup> |
62 | 78 | <TGZFilesDynamoHome Include="./dynamods-dynamo-home-*.tgz" /> |
|
0 commit comments