Skip to content

Commit d48a5f4

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Pre-parsed job name to replace spaces with '_'
1 parent 9f63f90 commit d48a5f4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/test/travis-ci/functions.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@ die() { echo "E: ${1}" 1>&2; exit ${2:-1}; }
99
set_status()
1010
{
1111

12-
local json=$(<<< "
12+
local job_name=$(<<< "${TRAVIS_JOB_NAME}" tr ' ' '_')
13+
local payload=$(<<< "
1314
{
1415
'state': '${1}',
1516
'description': '${2}',
16-
'context': 'travis-ci/${TRAVIS_JOB_NAME}',
17+
'context': 'travis-ci/${job_name}',
1718
'target_url': 'https://travis-ci.org/${TRAVIS_REPO_SLUG}/jobs/${TRAVIS_JOB_ID}'
1819
}" tr "'" '"')
1920

20-
<<< "${json}" jq .
21-
2221
curl --verbose --user "${MBED_BOT}" --request POST \
2322
"https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}" \
24-
--data @- <<< "${json}"
23+
--data @- <<< "${payload}"
2524
}
2625

2726
_install_gcc()

0 commit comments

Comments
 (0)