From 681fb9362b5dcc9f637e422a325511a6556fb367 Mon Sep 17 00:00:00 2001 From: huangpf Date: Tue, 14 Apr 2015 00:33:49 -0700 Subject: [PATCH] update postbuild & wxi --- setup/azurecmdfiles.wxi | 12 +++++++++ .../Commands.Storage/Commands.Storage.csproj | 9 +++---- .../Storage/Commands.Storage/PostBuild.ps1 | 27 +++++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 src/ServiceManagement/Storage/Commands.Storage/PostBuild.ps1 diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi index ac082f1b7c36..1e6585dc9101 100644 --- a/setup/azurecmdfiles.wxi +++ b/setup/azurecmdfiles.wxi @@ -1118,6 +1118,9 @@ + + + @@ -2764,6 +2767,9 @@ + + + @@ -2859,6 +2865,9 @@ + + + @@ -3366,6 +3375,7 @@ + @@ -3894,6 +3904,7 @@ + @@ -3925,6 +3936,7 @@ + diff --git a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj index 17b734011c04..ddb35d1075a0 100644 --- a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj +++ b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj @@ -264,6 +264,9 @@ + + Always + @@ -281,10 +284,6 @@ - - cd $(ProjectDir) - set ResourceOutDir="..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Storage\" - IF NOT EXIST "%25ResourceOutDir%25" mkdir "%25ResourceOutDir%25" - copy $(OutDir) "%25ResourceOutDir%25" /y + powershell.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)\PostBuild.ps1" "..\..\..\ResourceManager\AzureResourceManager\Storage" \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/PostBuild.ps1 b/src/ServiceManagement/Storage/Commands.Storage/PostBuild.ps1 new file mode 100644 index 000000000000..2050f24ace24 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/PostBuild.ps1 @@ -0,0 +1,27 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Write-Output -InputObject 'Starting post-build script'; + +$destDir = $args[0]; +Write-Output -InputObject $destDir; + +$sourcePath = "." + +if (Test-Path -Path $sourcePath) { + Write-Output -InputObject "Copying '$sourcePath' to directory '$destDir'"; + Copy-Item -Path $sourcePath -Destination $destDir -Recurse; +} + +Write-Output -InputObject 'Finished post-build script'; \ No newline at end of file