git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v1] travis-ci: build documentation

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Apr 25, 2016, 09:37 UTC
Message-ID
<vpq8u02yqp5.fsf@anie.imag.fr>
In-Reply-To
<E752A0BF-92D9-4BCF-ADD2-94F8E7BD66F2@gmail.com>
Lars Schneider <larsxschneider@gmail.com> writes:
Show 5 quoted lines
> On 22 Apr 2016, at 11:07, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
>
>> The ; or the newline is not needed either.
> 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...
OK.
Show 9 quoted lines
>>> +          then
>>> +          echo ""
>>> +          echo "------------------------------------------------------------------------" &&
>> 
>> I usualy avoid "echo <something-starting-with-dash>" as I'm not sure how
>> portable it is across variants of "echo". Maybe this one is portable
>> enough, I don't know. Perhaps printf, or cat << EOF ...?
> I am curious. Do you have an example on what platform echo "-something" 
> could go wrong? I wasn't aware of such an issue.
echo can, but doesn't have to implement non-POSIX options. For example,
  $ dash -c 'echo -e foo'
  -e foo
  $ bash -c 'echo -e foo'
  foo
This is a good reason to avoid
  echo "$string"
if $string is a user-supplied string.

I don't know if any shell have issue with --------, but I wouldn't be surprised if some implementation complained with "invalid option ---------".

But it is also likely that I'm the one being paranoid and your code is fine ;-).

>> test -s Documentation/git.html &&
>> test -s Documentation/git.1
> Great idea. Added to v2! The && is not necessary as Travis runs this script with "set -e".

Maybe I'm doing too much Python, but "explicit is better than implicit" ;-). I'd keep the && in case someone ever moves the code to a script that doesn't have -e, but I'm really nit-picking here ;-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Lars SchneiderNext: stefan.naewe@atlas-elektronik.com
Message 11 of 16 in “travis-ci: build documentation”
  1. travis-ci: build documentationlarsxschneider@gmail.com, Apr 22, 2016
  2. Matthieu MoyApr 22, 2016
  3. Junio C HamanoApr 22, 2016
  4. Lars SchneiderApr 25, 2016
  5. Junio C HamanoApr 25, 2016
  6. Junio C HamanoApr 25, 2016
  7. Matthieu MoyApr 25, 2016
  8. Junio C HamanoApr 25, 2016
  9. Matthieu MoyApr 25, 2016
  10. Lars SchneiderApr 25, 2016
  11. Matthieu MoyApr 25, 2016
  12. stefan.naewe@atlas-elektronik.comApr 22, 2016
  13. Lars SchneiderApr 25, 2016
  14. Jeff KingApr 23, 2016
  15. Lars SchneiderApr 25, 2016
  16. Jeff KingApr 25, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.