scripts/generate.sh in stigg-api-client-0.3.0 vs scripts/generate.sh in stigg-api-client-0.429.0
- old
+ new
@@ -1,17 +1,17 @@
+#!/bin/bash -e
+
# stitch the operation files together
-cat ../api-client-schema/src/operations/fragments.graphql > operations.graphql
-cat ../api-client-schema/src/operations/queries.graphql >> operations.graphql
-cat ../api-client-schema/src/operations/mutations.graphql >> operations.graphql
-cat ../api-client-schema/src/operations/subscriptions.graphql >> operations.graphql
+cat ../api-client-schema/src/operations/*.graphql > operations.graphql
-cp ../api-client-schema/src/generated/schema.json schema.json
+mkdir -p lib/stigg/generated/
-cat <<-EOF > schema.json
- $(echo { \"data\": ) $(cat schema.json) $(echo })
+cat <<-EOF > lib/stigg/generated/schema.json
+ $(echo { \"data\": ) $(cat ../api-client-schema/src/generated/schema.json) $(echo })
EOF
node scripts/generate-operations.mjs
+rm operations.graphql
-rubocop -a lib/stigg/generated/operations.rb
+bundle exec rubocop -a lib/stigg/generated/operations.rb
printf "api-client-ruby generated!\n"