Variables in zip pushed by octopackjs

I have a front end build I am packing using octopackjs. In this build I have some variables in the javascript files. My issue is that I only seem to be able to replace variables at the Deploy to server stage, but at this stage I only have a zip file.

How can I substitute the variables after I have unzipped?

Hi Tom,

Thanks for getting in touch! Package steps have a feature called Substitute variables in files that allows substitution in any specified file. It’s turned off by default, and you can enable it by selecting the Configure features option in your package step. Refer to my attached screenshot showing this option.

With this feature enabled, you can define your target files which you want to perform variable substitution in. The variables in your files should use the syntax #{VariableName}. Check out our documentation which provides more information and examples. :slight_smile:
https://octopus.com/docs/deploying-applications/substitute-variables-in-files

I hope this helps! Don’t hesitate to reach out if you have any further questions.

Best regards,

Kenny