From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: Lars Schneider <larsxschneider@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v1] travis-ci: build documentation
Date: Mon, 25 Apr 2016 21:32:04 +0200 [thread overview]
Message-ID: <vpqwpnlpjrf.fsf@anie.imag.fr> (raw)
In-Reply-To: <xmqq37q9ldd9.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Mon, 25 Apr 2016 12:03:46 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Lars Schneider <larsxschneider@gmail.com> writes:
>>
>>>> There also are existing instances of "useless ;" that would want to
>>>> be cleaned up regardless of portability issues.
>>> Unfortunately it seems to be required. Travis CI generates a shell script
>>> out of the yml file and I think they don't respect newlines or something...
>>
>> If they squash all the lines into a single long line before
>> executing, these semicolons do indeed become necessary (we have to
>> write a logical single line shell script in our Makefiles with ';',
>> and I'd imagine Travis's scriptlets are done similarly).
Actually, it's not Travis, but just the Yaml syntax:
http://docs.ansible.com/ansible/YAMLSyntax.html
Values can span multiple lines using | or >. Spanning multiple lines
using a | will include the newlines. Using a > will ignore newlines;
it’s used to make what would otherwise be a very long line easier to
read and edit
So, a simpler solution would be to apply something like this:
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,7 +33,7 @@ env:
- GIT_SKIP_TESTS="t9810 t9816"
before_install:
- - >
+ - |
case "${TRAVIS_OS_NAME:-linux}" in
linux)
mkdir --parents custom/p4
@@ -81,7 +81,7 @@ before_script: make --jobs=2
script: make --quiet test
after_failure:
- - >
+ - |
: '<-- Click here to see detailed test output!
';
for TEST_EXIT in t/test-results/*.exit;
do
(untested)
Actually, this may also be a motivation to move anything non-trivial out
of .travic.yml and to start using separate scripts (to avoid writting
shell within a Yaml syntax).
> ... but the above does not quite explain it. The newlines are
> mostly honoured as logical end-of-line in existing .travis.yml e.g.
> we do not see a semicolon before "pushd".
>
> case "${TRAVIS_OS_NAME:-linux}" in
> linux)
> mkdir --parents custom/p4
> pushd custom/p4
I'm tempted to think that these lines create directories pushd/ and
custom/p4/, but that doesn't quite explain it either. There's more magic
somewhere ...
> Puzzled...
Likewise.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2016-04-25 19:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 8:34 [PATCH v1] travis-ci: build documentation larsxschneider
2016-04-22 9:07 ` Matthieu Moy
2016-04-22 18:14 ` Junio C Hamano
2016-04-25 8:33 ` Lars Schneider
2016-04-25 16:56 ` Junio C Hamano
2016-04-25 19:03 ` Junio C Hamano
2016-04-25 19:32 ` Matthieu Moy [this message]
2016-04-25 19:46 ` Junio C Hamano
2016-04-25 9:26 ` Matthieu Moy
2016-04-25 8:17 ` Lars Schneider
2016-04-25 9:37 ` Matthieu Moy
2016-04-22 10:45 ` stefan.naewe
2016-04-25 8:20 ` Lars Schneider
2016-04-23 3:39 ` Jeff King
2016-04-25 8:35 ` Lars Schneider
2016-04-25 17:07 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqwpnlpjrf.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=larsxschneider@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.