After Octopus deploys the package to a MacOS (using SSH), it creates a subfolder named after the version number of the package. all my custom scripts run from within that folder, so I have to call ‘cd …/’ before doing what I want to do in the package. also, for the target files for variable substitution, my path has to start with …/. Is there anyway to not have to do this, and just be able to run with changing directory or targetting every file with …/
Thanks for getting in touch. I’m not sure I fully understand the problem. You are correct that we unpack packages into a directory with the release number. It sounds like you’re executing scripts from the parent directory thus requiring
cd ../. Is this correct? Can you provide an example of a scripts your executing? Is there a reason why it can’t be executed from the working directory? i.e. the directory with the release number. I’m also not sure why variable substitution would require a relative path. Can you elaborate more on this?
I’m sure an example will clarify things. Looking forward to your reply.
Hi Rob, actually that’s what I expected to be happening where the folder with the version name would have the code inside it. but seems that what’s happening is the version folder is empty and the code lives OUTSIDE that folder (hence why I have to do cd …/)
couple things to note: this is happening on a macOS server that Octopus connects through ssh then deploys the package (which is hosted on Octopus directly). If I download the package from OD, the unzipped folder has the code inside it directly, should I be zipping the file differently
Thanks for the reply. I see you’re deploying an iOS app w/ fastlane and I’ve done this in the past so I have a better understanding. I just packaged up an old iOS app (zip’d) and deployed it to a mac and it unpacked correctly (see the attached screenshot). I’m guessing that your package likely has relative paths and that’s why it’s being unpacked as it is. Can you share the command you’re using to package it? It might be helpful to open up the archive in 7zip on a PC as it should show any relative paths. Mine looks like the attached screenshot.
Can you also attach your deployment log? It’ll should help as well. If needed, you can make this discussion private.
Looking forward to your reply.