Exclude Files When Deploying From Git to Azure Sites

Question:

I would like to exclude certain files (by type) from my Azure Websites deployment. Can this be done without creating a custom deployment file?

Given:

  • Deploy MVC 4 web application from local Git repository
  • Want to exclude * .coffee (CoffeeScript) files from site deployment, but not from my Git repo
  • Selected Kudu wiki ( https://github.com/projectkudu/kudu/wiki ) but could not find an answer
+3
source share
2 answers

I assume that these CoffeeScript files are listed in your csproj file so that they appear in Visual Studio?

, , , " " "", "", .

+4

, ,

cd /d %HOME%\site\wwwroot
for /F "tokens=*" %%i in ('dir /s /b *.coffee') do del %%i

, , ,

for /F "tokens=*" %%i in ('dir /s /b *.coffee') do echo %%i >> toBeDeleted.txt
+1

All Articles