Skip to content

Commit ae4f1d8

Browse files
cotsogKai Hendry
authored andcommitted
Put commands on one line (#884)
Multi-lines aren't supported this way in YAML. See https://yaml-multiline.info/. Furthermore, the following **isn't supported** in our YAML DSL: ``` deploy: provider: script script: - command_1 - command_2 ``` Commands must be **on one line**: ``` deploy: provider: script script: command_1 && command_2 ``` Otherwise, the best suggestion would be to put your commands **in an external script**: ``` deploy: provider: script script: ./external-script.sh ```
1 parent 21951e3 commit ae4f1d8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

.travis.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,15 @@ matrix:
3333
deploy:
3434
provider: script
3535
skip_cleanup: true
36-
script:
37-
- AWS_ACCESS_KEY_ID=$AWS_915001051872_ID
38-
AWS_SECRET_ACCESS_KEY=$AWS_915001051872_SECRET
39-
./deploy.sh -d
36+
script: AWS_ACCESS_KEY_ID=$AWS_915001051872_ID AWS_SECRET_ACCESS_KEY=$AWS_915001051872_SECRET ./deploy.sh -d
4037
on:
4138
tags: true
4239
- env: DEPLOY=prod
4340
if: tag IS present
4441
deploy:
4542
provider: script
4643
skip_cleanup: true
47-
script:
48-
- AWS_ACCESS_KEY_ID=$AWS_192458993663_ID
49-
AWS_SECRET_ACCESS_KEY=$AWS_192458993663_SECRET
50-
./deploy.sh -p
51-
- AWS_ACCESS_KEY_ID=$AWS_192458993663_ID AWS_SECRET_ACCESS_KEY=$AWS_192458993663_SECRET aws cloudfront create-invalidation
52-
--distribution-id E173XT6X8V4A18 --paths '/*'
44+
script: AWS_ACCESS_KEY_ID=$AWS_192458993663_ID AWS_SECRET_ACCESS_KEY=$AWS_192458993663_SECRET ./deploy.sh -p && AWS_ACCESS_KEY_ID=$AWS_192458993663_ID AWS_SECRET_ACCESS_KEY=$AWS_192458993663_SECRET aws cloudfront create-invalidation --distribution-id E173XT6X8V4A18 --paths '/*'
5345
on:
5446
tags: true
5547

0 commit comments

Comments
 (0)