I have following deploy script in Travis file and facing problem with multiline command. I've tried lots of combination and couldn't find a proper solution. If I extract it to the file and call it from script attribute, it works properly but our aim is to put all the commands in the script attribute as multiline command.
deploy:
- provider: script
skip_cleanup: true
script: mvn deploy -B -DskipTests -Dbuild.number="$TRAVIS_BUILD_NUMBER"
on:
tags: false
branch: dev
- provider: script
skip_cleanup: true
script:
pip install something &&
another-command &&
yet-another-command &&
docker push "image-name"
on:
tags: false
all_branches: true
Here is the error logs:
sh: 1: Syntax error: "&&" unexpected
If someone knows how to define multiline commands, I will be appreciated. Thanks in advance.