I am trying to use VSTS to deploy a zip file to a Linux VM in Azure. I am using an SSH task to run the command:
sudo unzip -ju /home/$USER/release/deployfile-1.6.zip "*.war" -d "/opt/tomee/webapps/"
That command works. I don't want to change the filename each time it changes, though. I tried using a variable name:
sudo unzip -ju /home/$USER/release/$filename "*.war" -d "/opt/tomee/webapps/"
And I tried using a wildcard:
cd "/home/$USER/release/"
sudo unzip -ju '*.zip' "*.war" -d "/opt/tomee/webapps/"
(the above is supposed to be star.zip and star.war) Neither of those worked, and having little familiarity with Linux, I haven't been able to figure out a syntax that works.
Could someone please advise? Thank you.