{"thread":{"id":"42104","subject":"[PATCH v1] travis-ci: build documentation","startedAt":"2016-04-22T08:34:02Z","lastAt":"2016-04-25T19:46:38Z","messageCount":16,"participants":["larsxschneider@gmail.com","Matthieu Moy","stefan.naewe@atlas-elektronik.com","Junio C Hamano","Jeff King","Lars Schneider"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"284104","messageId":"1461314042-3132-1-git-send-email-larsxschneider@gmail.com","threadId":"42104","inReplyTo":null,"subject":"[PATCH v1] travis-ci: build documentation","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-22T08:34:02Z","receivedAt":"2016-04-22T08:34:02Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nRun \"make doc\" to check if all documentation can be build without errors.\nSince the documentation is the same on every platform/compiler, the check\nis only performed as part of the Linux/GCC build job to maintain a fast\nCI process.\n\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n\nPatch as promised in http://article.gmane.org/gmane.comp.version-control.git/291726\n\nCheers,\nLars\n\n .travis.yml | 13 ++++++++++++-\n 1 file changed, 12 insertions(+), 1 deletion(-)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex c3bf9c6..6ca7fb2 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -12,6 +12,8 @@ addons:\n   apt:\n     packages:\n     - language-pack-is\n+    - asciidoc\n+    - xmlto\n\n env:\n   global:\n@@ -70,7 +72,16 @@ before_install:\n\n before_script: make --jobs=2\n\n-script: make --quiet test\n+script:\n+  - >\n+      make --quiet test &&\n+      if [[ \"$TRAVIS_OS_NAME\" = linux ]] && [[ \"$CC\" = gcc ]];\n+          then\n+          echo \"\"\n+          echo \"------------------------------------------------------------------------\" &&\n+          echo \"$(tput setaf 2)Building documentation...$(tput sgr0)\" &&\n+          make --quiet doc\n+      fi;\n\n after_failure:\n   - >\n--\n2.5.1\n"},{"id":"284105","messageId":"vpq37qeovu4.fsf@anie.imag.fr","threadId":"42104","inReplyTo":"1461314042-3132-1-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2016-04-22T09:07:31Z","receivedAt":"2016-04-22T09:07:31Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"larsxschneider@gmail.com writes:\n\n> +      if [[ \"$TRAVIS_OS_NAME\" = linux ]] && [[ \"$CC\" = gcc ]];\n\n[[ is a bashism, and doesn't bring anything here compared to the POSIX\n[ ... ], or \"test\" which is prefered in Git's source code.\n\nThe ; or the newline is not needed either.\n\nI'd write\n\nif test \"$TRAVIS_OS_NAME\" = linux && test \"$CC\" = gcc; then\n\n> +          then\n> +          echo \"\"\n> +          echo \"------------------------------------------------------------------------\" &&\n\nI usualy avoid \"echo <something-starting-with-dash>\" as I'm not sure how\nportable it is across variants of \"echo\". Maybe this one is portable\nenough, I don't know. Perhaps printf, or cat << EOF ...?\n\n> +          echo \"$(tput setaf 2)Building documentation...$(tput sgr0)\" &&\n> +          make --quiet doc\n> +      fi;\n\nNit: useless ;\n\nI think it makes sense to do some lightweight checks after \"make doc\",\nrather than just check the return code. For example, check that a few\ngenerated files exist and are non-empty, like\n\ntest -s Documentation/git.html &&\ntest -s Documentation/git.1\n\nThanks,\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"284106","messageId":"3b57e4f4-afba-bb94-2c59-a9ff5765748d@atlas-elektronik.com","threadId":"42104","inReplyTo":"1461314042-3132-1-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"","fromEmail":"stefan.naewe@atlas-elektronik.com","sentAt":"2016-04-22T10:45:24Z","receivedAt":"2016-04-22T10:45:24Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Am 22.04.2016 um 10:34 schrieb larsxschneider@gmail.com:\n> From: Lars Schneider <larsxschneider@gmail.com>\n> \n> Run \"make doc\" to check if all documentation can be build without errors.\n\ns/build/built/\n\n\n> Since the documentation is the same on every platform/compiler, the check\n> is only performed as part of the Linux/GCC build job to maintain a fast\n> CI process.\n> \n> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n> ---\n> \n> Patch as promised in http://article.gmane.org/gmane.comp.version-control.git/291726\n> \n> Cheers,\n> Lars\n> \n>  .travis.yml | 13 ++++++++++++-\n>  1 file changed, 12 insertions(+), 1 deletion(-)\n> \n> diff --git a/.travis.yml b/.travis.yml\n> index c3bf9c6..6ca7fb2 100644\n> --- a/.travis.yml\n> +++ b/.travis.yml\n> @@ -12,6 +12,8 @@ addons:\n>    apt:\n>      packages:\n>      - language-pack-is\n> +    - asciidoc\n> +    - xmlto\n> \n>  env:\n>    global:\n> @@ -70,7 +72,16 @@ before_install:\n> \n>  before_script: make --jobs=2\n> \n> -script: make --quiet test\n> +script:\n> +  - >\n> +      make --quiet test &&\n> +      if [[ \"$TRAVIS_OS_NAME\" = linux ]] && [[ \"$CC\" = gcc ]];\n> +          then\n> +          echo \"\"\n> +          echo \"------------------------------------------------------------------------\" &&\n> +          echo \"$(tput setaf 2)Building documentation...$(tput sgr0)\" &&\n> +          make --quiet doc\n> +      fi;\n> \n>  after_failure:\n>    - >\n\nStefan\n-- \n----------------------------------------------------------------\n/dev/random says: The cat that ate the ball of yarn....had mittens!\npython -c \"print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')\" \nGPG Key fingerprint = 2DF5 E01B 09C3 7501 BCA9  9666 829B 49C5 9221 27AF\n"},{"id":"284161","messageId":"xmqqinz9pl3l.fsf@gitster.mtv.corp.google.com","threadId":"42104","inReplyTo":"vpq37qeovu4.fsf@anie.imag.fr","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-22T18:14:06Z","receivedAt":"2016-04-22T18:14:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> larsxschneider@gmail.com writes:\n>\n>> +      if [[ \"$TRAVIS_OS_NAME\" = linux ]] && [[ \"$CC\" = gcc ]];\n>\n> [[ is a bashism, and doesn't bring anything here compared to the POSIX\n> [ ... ], or \"test\" which is prefered in Git's source code.\n>\n> The ; or the newline is not needed either.\n\nHonestly, I didn't know that we were even trying to be pure POSIX,\navoid bashism or GNUism, or in general to follow our shell scripting\nstyle in the scriptlet in the .travis.yml file.\n\nWhile I feel fairly strongly about keeping the generic part generic,\nI am actually OK with things that are known to be used in a specific\nenvironment to be specific to that environment.\n\nHaving said all that, if we are not benefiting from using features\nbeyond POSIX, then by all means we should strive to be writing our\nstuff in a portable way, as we do not have firm control over from\nwhere and to where people cut and paste code snippets.\n\nAnd I do think bashism [[ ... ]] is *NOT* buying anything in this\nparticular case, so I do agree with you that\n\n\tif test \"$TRAVIS_OS_NAME\" = linux && test \"$CC\" = gcc\n        then\n        \t...\n\nor even\n\n\tcase \"$TRAVIS_OS_NAME,$CC\" in\n        linux,gcc)\n        \t...\n\nis what I would have written instead if I were writing this\nconditional.\n\nIf we were to shoot for \"be POSIX unless we can clearly benefit from\nbeing bash/gnu/linux specific in bash/gnu/linux specific parts\", the\nexisting scriptlets in .travis.yml file has a few things that may\nneed to be cleaned up already.  There are \"mkdir --parents\" (POSIX\nspells it \"-p\"), \"pushd/popd\" and invocation of \"tar\" is very GNU\nspecific in the part that appears in the case arm for \"linux\".\n\nThere also are existing instances of \"useless ;\" that would want to\nbe cleaned up regardless of portability issues.\n\n>> +          then\n>> +          echo \"\"\n>> +          echo \"------------------------------------------------------------------------\" &&\n>\n> I usualy avoid \"echo <something-starting-with-dash>\" as I'm not sure how\n> portable it is across variants of \"echo\". Maybe this one is portable\n> enough, I don't know. Perhaps printf, or cat << EOF ...?\n\nDo you even need a long divider there?\n\n> I think it makes sense to do some lightweight checks after \"make doc\",\n> rather than just check the return code. For example, check that a few\n> generated files exist and are non-empty, like\n>\n> test -s Documentation/git.html &&\n> test -s Documentation/git.1\n\nYup, or the formatter does not give new/unknown warnings.\n\nThanks.\n"},{"id":"284220","messageId":"20160423033922.GA15994@sigill.intra.peff.net","threadId":"42104","inReplyTo":"1461314042-3132-1-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-04-23T03:39:23Z","receivedAt":"2016-04-23T03:39:23Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Apr 22, 2016 at 10:34:02AM +0200, larsxschneider@gmail.com wrote:\n\n> From: Lars Schneider <larsxschneider@gmail.com>\n> \n> Run \"make doc\" to check if all documentation can be build without errors.\n> Since the documentation is the same on every platform/compiler, the check\n> is only performed as part of the Linux/GCC build job to maintain a fast\n> CI process.\n\nThis does slow down the normal test results for linux/gcc, though. I\ndon't know very much about Travis, but is it possible to break out the\ndocumentation build into its own test, with a separate build status from\nthe other runs?\n\n-Peff\n"},{"id":"284379","messageId":"E752A0BF-92D9-4BCF-ADD2-94F8E7BD66F2@gmail.com","threadId":"42104","inReplyTo":"vpq37qeovu4.fsf@anie.imag.fr","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-25T08:17:25Z","receivedAt":"2016-04-25T08:17:25Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 22 Apr 2016, at 11:07, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:\n\n> larsxschneider@gmail.com writes:\n> \n>> +      if [[ \"$TRAVIS_OS_NAME\" = linux ]] && [[ \"$CC\" = gcc ]];\n> \n> [[ is a bashism, and doesn't bring anything here compared to the POSIX\n> [ ... ], or \"test\" which is prefered in Git's source code.\nOK! Thanks for the hint.\n\n\n> The ; or the newline is not needed either.\nUnfortunately it seems to be required. Travis CI generates a shell script\nout of the yml file and I think they don't respect newlines or something...\n\n\n> \n> I'd write\n> \n> if test \"$TRAVIS_OS_NAME\" = linux && test \"$CC\" = gcc; then\n> \n>> +          then\n>> +          echo \"\"\n>> +          echo \"------------------------------------------------------------------------\" &&\n> \n> I usualy avoid \"echo <something-starting-with-dash>\" as I'm not sure how\n> portable it is across variants of \"echo\". Maybe this one is portable\n> enough, I don't know. Perhaps printf, or cat << EOF ...?\nI am curious. Do you have an example on what platform echo \"-something\" \ncould go wrong? I wasn't aware of such an issue.\n\n\n> \n>> +          echo \"$(tput setaf 2)Building documentation...$(tput sgr0)\" &&\n>> +          make --quiet doc\n>> +      fi;\n> \n> Nit: useless ;\nAgain, seems to be required by the Travis yml converter.\n\n\n> I think it makes sense to do some lightweight checks after \"make doc\",\n> rather than just check the return code. For example, check that a few\n> generated files exist and are non-empty, like\n> \n> test -s Documentation/git.html &&\n> test -s Documentation/git.1\nGreat idea. Added to v2! The && is not necessary as Travis runs this script with \"set -e\".\n\nThanks,\nLars"},{"id":"284380","messageId":"8D224433-C589-433A-B3D7-1073508A6EBD@gmail.com","threadId":"42104","inReplyTo":"3b57e4f4-afba-bb94-2c59-a9ff5765748d@atlas-elektronik.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-25T08:20:39Z","receivedAt":"2016-04-25T08:20:39Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 22 Apr 2016, at 12:45, stefan.naewe@atlas-elektronik.com wrote:\n\n> Am 22.04.2016 um 10:34 schrieb larsxschneider@gmail.com:\n>> From: Lars Schneider <larsxschneider@gmail.com>\n>> \n>> Run \"make doc\" to check if all documentation can be build without errors.\n> \n> s/build/built/\n\nFixed. Thank you!\n\n- Lars\n"},{"id":"284381","messageId":"EDD0757C-2BD3-476F-B703-147D35BB1FAC@gmail.com","threadId":"42104","inReplyTo":"xmqqinz9pl3l.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-25T08:33:20Z","receivedAt":"2016-04-25T08:33:20Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 22 Apr 2016, at 20:14, Junio C Hamano <gitster@pobox.com> wrote:\n\n> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n> \n>> larsxschneider@gmail.com writes:\n>> \n>>> +      if [[ \"$TRAVIS_OS_NAME\" = linux ]] && [[ \"$CC\" = gcc ]];\n>> \n>> [[ is a bashism, and doesn't bring anything here compared to the POSIX\n>> [ ... ], or \"test\" which is prefered in Git's source code.\n>> \n>> The ; or the newline is not needed either.\n> \n> Honestly, I didn't know that we were even trying to be pure POSIX,\n> avoid bashism or GNUism, or in general to follow our shell scripting\n> style in the scriptlet in the .travis.yml file.\n> \n> While I feel fairly strongly about keeping the generic part generic,\n> I am actually OK with things that are known to be used in a specific\n> environment to be specific to that environment.\n> \n> Having said all that, if we are not benefiting from using features\n> beyond POSIX, then by all means we should strive to be writing our\n> stuff in a portable way, as we do not have firm control over from\n> where and to where people cut and paste code snippets.\n> \n> And I do think bashism [[ ... ]] is *NOT* buying anything in this\n> particular case, so I do agree with you that\n> \n> \tif test \"$TRAVIS_OS_NAME\" = linux && test \"$CC\" = gcc\n>        then\n>        \t...\n> \n> or even\n> \n> \tcase \"$TRAVIS_OS_NAME,$CC\" in\n>        linux,gcc)\n>        \t...\n> \n> is what I would have written instead if I were writing this\n> conditional.\nOh, thanks! I didn't know that \"case\" can process two variables :-)\n\n\n> If we were to shoot for \"be POSIX unless we can clearly benefit from\n> being bash/gnu/linux specific in bash/gnu/linux specific parts\", the\n> existing scriptlets in .travis.yml file has a few things that may\n> need to be cleaned up already.  There are \"mkdir --parents\" (POSIX\n> spells it \"-p\"), \"pushd/popd\" and invocation of \"tar\" is very GNU\n> specific in the part that appears in the case arm for \"linux\".\nAll code in the .travis.yml is quite Travis CI specific and therefore\nI think portability is not really an issue. However, I agree that\nthe .travis.yml should follow the Git coding guidelines for \nconsistency.\n\n\n> There also are existing instances of \"useless ;\" that would want to\n> be cleaned up regardless of portability issues.\nUnfortunately it seems to be required. Travis CI generates a shell script\nout of the yml file and I think they don't respect newlines or something...\n\n\n> \n>>> +          then\n>>> +          echo \"\"\n>>> +          echo \"------------------------------------------------------------------------\" &&\n>> \n>> I usualy avoid \"echo <something-starting-with-dash>\" as I'm not sure how\n>> portable it is across variants of \"echo\". Maybe this one is portable\n>> enough, I don't know. Perhaps printf, or cat << EOF ...?\n> \n> Do you even need a long divider there?\nI thought it is nice as it generates a visual distinctive separation\nin the Travis CI output. However, Peff suggested a dedicated Documentation \nbuild job which makes this separation obsolete.\n\n\n>> I think it makes sense to do some lightweight checks after \"make doc\",\n>> rather than just check the return code. For example, check that a few\n>> generated files exist and are non-empty, like\n>> \n>> test -s Documentation/git.html &&\n>> test -s Documentation/git.1\n> \n> Yup, or the formatter does not give new/unknown warnings.\nWhat do you mean by \"formatter does not give new/unknown warnings\"?\nCan you give me a hint what I could test here in addition?\n\n\nThanks,\nLars\n"},{"id":"284382","messageId":"B674CC4C-5506-4E5C-B638-45E0FAD50842@gmail.com","threadId":"42104","inReplyTo":"20160423033922.GA15994@sigill.intra.peff.net","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-25T08:35:24Z","receivedAt":"2016-04-25T08:35:24Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 23 Apr 2016, at 05:39, Jeff King <peff@peff.net> wrote:\n\n> On Fri, Apr 22, 2016 at 10:34:02AM +0200, larsxschneider@gmail.com wrote:\n> \n>> From: Lars Schneider <larsxschneider@gmail.com>\n>> \n>> Run \"make doc\" to check if all documentation can be build without errors.\n>> Since the documentation is the same on every platform/compiler, the check\n>> is only performed as part of the Linux/GCC build job to maintain a fast\n>> CI process.\n> \n> This does slow down the normal test results for linux/gcc, though. I\n> don't know very much about Travis, but is it possible to break out the\n> documentation build into its own test, with a separate build status from\n> the other runs?\n\nGreat idea. This is how it looks.\n\nAll jobs of a run:\nhttps://travis-ci.org/larsxschneider/git/builds/125506781\n\nThe documentation job:\nhttps://travis-ci.org/larsxschneider/git/jobs/125506786\n\nThanks,\nLars\n"},{"id":"284385","messageId":"vpqr3duyr85.fsf@anie.imag.fr","threadId":"42104","inReplyTo":"xmqqinz9pl3l.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2016-04-25T09:26:02Z","receivedAt":"2016-04-25T09:26:02Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n>\n>> larsxschneider@gmail.com writes:\n>>\n>>> +      if [[ \"$TRAVIS_OS_NAME\" = linux ]] && [[ \"$CC\" = gcc ]];\n>>\n>> [[ is a bashism, and doesn't bring anything here compared to the POSIX\n>> [ ... ], or \"test\" which is prefered in Git's source code.\n>>\n>> The ; or the newline is not needed either.\n>\n> Honestly, I didn't know that we were even trying to be pure POSIX,\n> avoid bashism or GNUism, or in general to follow our shell scripting\n> style in the scriptlet in the .travis.yml file.\n\nI'm not implying that we should absolutely avoid non-POSIX constructs,\njust that the conjuction \"non-POSIX + not useful\" made me prefer to\nremain POSIX.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"284386","messageId":"vpq8u02yqp5.fsf@anie.imag.fr","threadId":"42104","inReplyTo":"E752A0BF-92D9-4BCF-ADD2-94F8E7BD66F2@gmail.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2016-04-25T09:37:26Z","receivedAt":"2016-04-25T09:37:26Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Lars Schneider <larsxschneider@gmail.com> writes:\n\n> On 22 Apr 2016, at 11:07, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:\n>\n>> The ; or the newline is not needed either.\n> Unfortunately it seems to be required. Travis CI generates a shell script\n> out of the yml file and I think they don't respect newlines or something...\n\nOK.\n\n>>> +          then\n>>> +          echo \"\"\n>>> +          echo \"------------------------------------------------------------------------\" &&\n>> \n>> I usualy avoid \"echo <something-starting-with-dash>\" as I'm not sure how\n>> portable it is across variants of \"echo\". Maybe this one is portable\n>> enough, I don't know. Perhaps printf, or cat << EOF ...?\n> I am curious. Do you have an example on what platform echo \"-something\" \n> could go wrong? I wasn't aware of such an issue.\n\necho can, but doesn't have to implement non-POSIX options. For example,\n\n  $ dash -c 'echo -e foo'\n  -e foo\n  $ bash -c 'echo -e foo'\n  foo\n\nThis is a good reason to avoid\n\n  echo \"$string\"\n\nif $string is a user-supplied string.\n\nI don't know if any shell have issue with --------, but I wouldn't be\nsurprised if some implementation complained with \"invalid option\n---------\".\n\nBut it is also likely that I'm the one being paranoid and your code is\nfine ;-).\n\n>> test -s Documentation/git.html &&\n>> test -s Documentation/git.1\n> Great idea. Added to v2! The && is not necessary as Travis runs this script with \"set -e\".\n\nMaybe I'm doing too much Python, but \"explicit is better than\nimplicit\" ;-). I'd keep the && in case someone ever moves the code to a\nscript that doesn't have -e, but I'm really nit-picking here ;-).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"284446","messageId":"xmqqh9epmxtj.fsf@gitster.mtv.corp.google.com","threadId":"42104","inReplyTo":"EDD0757C-2BD3-476F-B703-147D35BB1FAC@gmail.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-25T16:56:40Z","receivedAt":"2016-04-25T16:56:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lars Schneider <larsxschneider@gmail.com> writes:\n\n>> There also are existing instances of \"useless ;\" that would want to\n>> be cleaned up regardless of portability issues.\n> Unfortunately it seems to be required. Travis CI generates a shell script\n> out of the yml file and I think they don't respect newlines or something...\n\nIf they squash all the lines into a single long line before\nexecuting, these semicolons do indeed become necessary (we have to\nwrite a logical single line shell script in our Makefiles with ';',\nand I'd imagine Travis's scriptlets are done similarly).\n\nThanks.\n"},{"id":"284449","messageId":"20160425170748.GB1551@sigill.intra.peff.net","threadId":"42104","inReplyTo":"B674CC4C-5506-4E5C-B638-45E0FAD50842@gmail.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-04-25T17:07:48Z","receivedAt":"2016-04-25T17:07:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Apr 25, 2016 at 10:35:24AM +0200, Lars Schneider wrote:\n\n> > This does slow down the normal test results for linux/gcc, though. I\n> > don't know very much about Travis, but is it possible to break out the\n> > documentation build into its own test, with a separate build status from\n> > the other runs?\n> \n> Great idea. This is how it looks.\n> \n> All jobs of a run:\n> https://travis-ci.org/larsxschneider/git/builds/125506781\n> \n> The documentation job:\n> https://travis-ci.org/larsxschneider/git/jobs/125506786\n\nVery cool. Thanks!\n\n-Peff\n"},{"id":"284469","messageId":"xmqq37q9ldd9.fsf@gitster.mtv.corp.google.com","threadId":"42104","inReplyTo":"xmqqh9epmxtj.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-25T19:03:46Z","receivedAt":"2016-04-25T19:03:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Lars Schneider <larsxschneider@gmail.com> writes:\n>\n>>> There also are existing instances of \"useless ;\" that would want to\n>>> be cleaned up regardless of portability issues.\n>> Unfortunately it seems to be required. Travis CI generates a shell script\n>> out of the yml file and I think they don't respect newlines or something...\n>\n> If they squash all the lines into a single long line before\n> executing, these semicolons do indeed become necessary (we have to\n> write a logical single line shell script in our Makefiles with ';',\n> and I'd imagine Travis's scriptlets are done similarly).\n>\n> Thanks.\n\n... but the above does not quite explain it.  The newlines are\nmostly honoured as logical end-of-line in existing .travis.yml e.g.\nwe do not see a semicolon before \"pushd\".\n\n            case \"${TRAVIS_OS_NAME:-linux}\" in\n            linux)\n              mkdir --parents custom/p4\n              pushd custom/p4\n            ...\n            esac;\n            echo \"$(tput setaf 6)Perforce Server Version$(tput sgr0)\";\n            ...\n\neverything outside the big \"case/esac\" seems to have ';' in the\ncurrent incarnation of the script.\n\nPuzzled...\n"},{"id":"284472","messageId":"vpqwpnlpjrf.fsf@anie.imag.fr","threadId":"42104","inReplyTo":"xmqq37q9ldd9.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2016-04-25T19:32:04Z","receivedAt":"2016-04-25T19:32:04Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> Lars Schneider <larsxschneider@gmail.com> writes:\n>>\n>>>> There also are existing instances of \"useless ;\" that would want to\n>>>> be cleaned up regardless of portability issues.\n>>> Unfortunately it seems to be required. Travis CI generates a shell script\n>>> out of the yml file and I think they don't respect newlines or something...\n>>\n>> If they squash all the lines into a single long line before\n>> executing, these semicolons do indeed become necessary (we have to\n>> write a logical single line shell script in our Makefiles with ';',\n>> and I'd imagine Travis's scriptlets are done similarly).\n\nActually, it's not Travis, but just the Yaml syntax:\n\n  http://docs.ansible.com/ansible/YAMLSyntax.html\n  \n  Values can span multiple lines using | or >. Spanning multiple lines\n  using a | will include the newlines. Using a > will ignore newlines;\n  it’s used to make what would otherwise be a very long line easier to\n  read and edit\n\nSo, a simpler solution would be to apply something like this:\n\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -33,7 +33,7 @@ env:\n     - GIT_SKIP_TESTS=\"t9810 t9816\"\n \n before_install:\n-  - >\n+  - |\n     case \"${TRAVIS_OS_NAME:-linux}\" in\n     linux)\n       mkdir --parents custom/p4\n@@ -81,7 +81,7 @@ before_script: make --jobs=2\n script: make --quiet test\n \n after_failure:\n-  - >\n+  - |\n     : '<-- Click here to see detailed test output!                                          \n            ';                                                                              \n     for TEST_EXIT in t/test-results/*.exit;\n     do\n\n(untested)\n\nActually, this may also be a motivation to move anything non-trivial out\nof .travic.yml and to start using separate scripts (to avoid writting\nshell within a Yaml syntax).\n\n> ... but the above does not quite explain it.  The newlines are\n> mostly honoured as logical end-of-line in existing .travis.yml e.g.\n> we do not see a semicolon before \"pushd\".\n>\n>             case \"${TRAVIS_OS_NAME:-linux}\" in\n>             linux)\n>               mkdir --parents custom/p4\n>               pushd custom/p4\n\nI'm tempted to think that these lines create directories pushd/ and\ncustom/p4/, but that doesn't quite explain it either. There's more magic\nsomewhere ...\n\n> Puzzled...\n\nLikewise.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"284474","messageId":"xmqqpotdjwtd.fsf@gitster.mtv.corp.google.com","threadId":"42104","inReplyTo":"vpqwpnlpjrf.fsf@anie.imag.fr","subject":"Re: [PATCH v1] travis-ci: build documentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-25T19:46:38Z","receivedAt":"2016-04-25T19:46:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Actually, this may also be a motivation to move anything non-trivial out\n> of .travic.yml and to start using separate scripts (to avoid writting\n> shell within a Yaml syntax).\n\nExcellent suggestion.  I do not mind if we added a new directory at\nthe top-level of the tree to hold helper scripts for CI (perhaps\ncall it ci/ not travis/ so that people may later add helper scripts\nfor other CI systems of their liking if they wanted to).\n"}]}