sponte / Powershell.Deployment

Powershell scripts that automated component deployment. Supports windows services (srvany.exe, NServiceBus, TopShelf) and websites.
MIT License
15 stars 8 forks source link

Don't copy this library's own scripts to "repo versioned" source dir - copy only to "build output" dir #31

Open slawomir-brzezinski-at-interxion opened 7 years ago

slawomir-brzezinski-at-interxion commented 7 years ago

As hinted here.

This would improve clarity of pull requests (and repo history overall) for users of the tool.

Many NuGet packages already do this by having their own MsBuild .include files, to have the files copied from the packages/ only during creation of package/artifact, and only to the respective staging folder for the packager.

slawomir-brzezinski-at-interxion commented 7 years ago

A special problem (at Interxion user) with the current solution of achieving the copying by adding the files to the project with <CopyToOutputDirectory> is that the files will also get copied into any IntegrationTests projects that reference 'the main app project' and will get inadvertently executed during their deployment.

A workaround is to have the IntegrationTests project explicitly delete the Deploy.ps1, but it's hard to ensure everyone in the team knows this and usually each occurrence results in a lengthy investigation.