Octo.exe pack support --exclude (on top of --include)

I take it that only --include is supported. Is there any chance you can support --exclude as well? It would be really helpful in some scenarios.

Hi Dominick,

Thanks for getting in touch! I don’t see any previous requests to support the --exclude argument in Octo.exe’s pack command. We’d recommend defining which files to exclude when packing by defining your .nuspec file to do so with something like the following.

<files>
    <file src="VALUE" target="\" exclude="VALUE"/>
</files>

Feel free to also suggest this idea up on our UserVoice site in order to gauge community support to help us prioritize enhancements like this in the future. :slight_smile:

https://octopusdeploy.uservoice.com/

I hope this helps! Let me know how you go or if you have any further questions moving forward.

Best regards,

Mr Bates,

Thank you for the prompt reply. We would use the nuspec approach but per octo.exe documentation -help message- the octopus team suggests using .zip from here on forth (feel free to type ‘octo help pack’). At the time of this writing the .zip approach is devoid of exclusion provisions.

Thank you for your time and consideration.

Yours Sincerely,
Dominick Sidiropoulos

Hi Dominick,

Thanks for following up! Packaging in ZIP format is simpler in some ways, though NuGet is still completely valid and support. If you’d like to stick with .zip, I’d move the files you don’t want included in the zip out of the directory prior to zipping up, or you could add a custom script in your deployment process to remove them.

Don’t hesitate to reach out if you have any further questions or concerns moving forward!

Best regards,

Kenny

Or you could use something like MSBuild’s < ZipTask > which does support the ‘Exclude’ property. The only drawback being that < ZipTask > might have some drawbacks when the underlying .net is not 4.6.1 or greater (based on the footnotes of the ‘octo.exe pack’ command). We are aware of decent workarounds. It’s not because of that fact, but despite of that fact, that prefer the ‘octo.exe pack’ approach (and for good reason).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.