|
2 | 2 | set -e |
3 | 3 |
|
4 | 4 | if [[ "$CI" != "true" ]]; then |
5 | | - echo "(notify bailing: not in CI)" |
| 5 | + echo "(bailing: not in CI)" |
6 | 6 | exit |
7 | 7 | elif [[ $# -lt 1 ]]; then |
8 | 8 | echo "No status provided!" >&2 |
9 | 9 | exit 1 |
10 | 10 | fi |
11 | 11 |
|
12 | | -# the commit status context |
13 | | -context="npm publish" |
14 | | -_status=$1 |
15 | | - |
16 | | -# get the published version of primer from its package.json |
17 | | -package=primer |
18 | | -version=$(jq -r .version modules/$package/package.json) |
19 | | -published="$package@$version" |
20 | | - |
21 | | -message="" |
22 | | -if [[ "$_status" = "success" ]]; then |
23 | | - # TODO point this at the contributing docs! |
24 | | - message="https://unpkg.com/$published/build/build.css" |
25 | | -fi |
26 | | - |
27 | 12 | # XXX this will go away if we build pushes instead of PRs |
28 | 13 | if [[ "$TRAVIS_PULL_REQUEST_SHA" != "" ]]; then |
29 | 14 | # setting TRAVIS_COMMIT inline here is a fix for: |
30 | 15 | # <https://github.com/taskworld/commit-status/issues/5> |
31 | 16 | export TRAVIS_COMMIT=$TRAVIS_PULL_REQUEST_SHA |
32 | 17 | fi |
33 | 18 |
|
34 | | -echo "📡 Transmitting publish status for $published..." |
35 | | -commit-status "$_status" "$context" "$published" "$message" |
| 19 | +_status=$1 |
| 20 | + |
| 21 | +version=$(jq -r .version package.json) |
| 22 | +name=$(jq -r .name package.json) |
| 23 | + |
| 24 | +# the commit status context |
| 25 | +context="npm publish $name" |
| 26 | +message="https://unpkg.com/$name@$version/" |
| 27 | + |
| 28 | +echo "📡 Transmitting publish status for $context $name@$version..." |
| 29 | +commit-status "$_status" "$context" "$name@$version" "$message" |
0 commit comments