Running bash scripts on the octopus server

Hi,

I have octopus tentacle installed on mac machine. I am trying to run bash scrips to run on the tenticle. But nothing happens.
No error message or anything. I am running as a seperate script after deployment happen

Here is my script with simple mv command

Script:
echo $(get_octopusvariable “Environment”)
echo $(get_octopusvariable “Release.Number”)

mv “~/.octopus/Applications/OctopusServer/$(get_octopusvariable “Environment”)/RA.Mobile.HEROGov2.0/1.1.301.301-DEV/HERO Gov.ipa” “~/.octopus/Applications/OctopusServer/$(get_octopusvariable “Environment”)/RA.Mobile.HEROGov2.0/1.1.301.301-DEV/HERO Gov.zip”

Output log :
DEV
echo 1.1.301.301-DEV24
mv ~/.octopus/Applications/OctopusServer/DEV/RA.Mobile.HEROGov2.0/1.1.301.301-DEV/HERO Gov.ipa ~/.octopus/Applications/OctopusServer/DEV/RA.Mobile.HEROGov2.0/1.1.301.301-DEV/HERO Gov.zip

Please help…

Hi Nandini,

That is odd. The part that looks suspicous to me is that “DEV” is echoed in the log, followed by “echo …”.
Is it possible the first echo command is inadvertently echoing the entire script, causing it to be written to output rather than executed? Is there a line-break or encoding issue perhaps?

Are you executing the script from a file in a package, or from text enterered in the Octopus Deploy step?

If you are still having issues, could you attach a full task log please?

Regards,
Michael