Search code examples
shtravis-cihockeyapp

Is it possible to see the output of cURL in the TravisCI console?


I am integrating HockeyApp with TravisCI, but when using the wrong HockeyApp Token value, I couldn't see any issue in the TravisCI console output. Running the CURL in Terminal quite clearly displayed the error:

{"errors":{"credentials":["api token invalid"]}}

is there anyway to display in the TraveisCI console, the results of cURL, when called from a build-and-upload.sh script?

I tried to do the following with our success:

rtn = $(curl http://....
echo $rtn

The return I got was interesting, but it was displayed even if the build wasn't uploaded. Trying to echo the rtn value also clearly failed.

***************************
* Uploading to Hockeyapp  *
***************************
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100  216k  100    48  100  216k     27   124k  0:00:01  0:00:01 --:--:--  124k
./scripts/sign-and-upload.sh: line 33: rtn: command not found

Solution

  • Doh! I was caught out by the space on either side of the =

    rtn=$(curl http://....
    

    This works!