I am deploying an Angular app to Azure, using grunt and octo-pack. This is working and the package is uploaded to Octopus. However, the package includes the dist folder, so when Octopus deploys the package, instead of deploying the contents of the dist folder to the website root, it is adding a dist folder and deploying the files inside there.
Looking at the octo-pack code, I can see the problem. It adds the files to the package with the full source path. I have submitted a PR on GitHub that will add this essential functionality.
The inability to remove top level directories from the package is indeed an issue. After talking with the team we decided to implement the Grunt cwd (current working directory) option as a way to allow packages to be built without including intermediate directories.
I’ve included the attached dist folder in a grunt project that I’ve checked into https://github.com/mcasperson/GruntTest. When I run grunt locally, which is set to pack the dist folder by default, the resulting zip file contains all the files.
Can you test the sample project and see if you get the same results?
So…this is embarrassing! I’m really sorry, I messed up!
I updated the npm package for grunt-octo, but on checking the package.json, I can see it was still using 0.0.49. I set it to 0.0.50 and ran ‘npm install’ and it all works as advertised!
Sorry to have wasted your time and thank you for your help and assistance.
If version 0.0.50 provides the functionality you need I’ll close the PR, but thanks for pointing out the original problem. I’m sure others will appreciate this new functionality.