Skip to content

Commit

Permalink
Port fetch-schema util to OS X (#688)
Browse files Browse the repository at this point in the history
"mktemp" on Linux and OS X has different implementations. So, some
features of Linux "mktemp" is unsupported on OS X/FreeBSD. However
such function was used only as random name generator. It was
replaced with "uuidgen" that should be supported on all platforms.

Also this patch runs "graphql-cli" with npx. Sometimes we could
get "graphql: command is not found".

Closes #683
  • Loading branch information
olegrok authored Mar 26, 2020
1 parent 36da93d commit 4cab5c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fetch-schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
TARANTOOL_WORKDIR=dev/gql-schema test/entrypoint/srv_basic.lua &
PID=$!

TMP=$(mktemp --suffix .graphql)
graphql get-schema -o $TMP
TMP=$(uuidgen).graphql
npx graphql get-schema -o $TMP

OUTPUT="doc/schema.graphql"
diff \
Expand Down

0 comments on commit 4cab5c2

Please sign in to comment.