Skip to content

Commit d5abec9

Browse files
committed
fixed react release script
1 parent f5283a4 commit d5abec9

File tree

8 files changed

+29
-27
lines changed

8 files changed

+29
-27
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ functions:
164164
This is a mono-repo setup containing packages for the `graphql-playground-react` and `graphql-playground-electron`.
165165

166166
```sh
167-
$ cd packages/graphql-playground-react
167+
# installs all dependencies for all packages
168168
$ yarn
169+
$ cd packages/graphql-playground-react
169170
$ yarn start
170171
```
171172
Open

packages/graphql-playground-electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"graphcool-ui": "^0.0.13",
9696
"graphql-config": "^1.1.2",
9797
"graphql-config-extension-graphcool": "1.0.1",
98-
"graphql-playground-react": "1.3.21",
98+
"graphql-playground-react": "1.3.22",
9999
"js-yaml": "^3.10.0",
100100
"lodash.merge": "^4.6.0",
101101
"minimist": "^1.2.0",

packages/graphql-playground-middleware-express/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground-middleware-express",
3-
"version": "1.4.4",
3+
"version": "1.4.6",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-express",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [
@@ -14,7 +14,7 @@
1414
"files": [
1515
"dist"
1616
],
17-
"playgroundVersion": "1.3.21",
17+
"playgroundVersion": "1.3.22",
1818
"scripts": {
1919
"build": "rimraf dist && tsc",
2020
"prepare": "npm run build"

packages/graphql-playground-middleware-hapi/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground-middleware-hapi",
3-
"version": "1.3.6",
3+
"version": "1.3.7",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-hapi",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [
@@ -14,7 +14,7 @@
1414
"files": [
1515
"dist"
1616
],
17-
"playgroundVersion": "1.3.21",
17+
"playgroundVersion": "1.3.22",
1818
"scripts": {
1919
"build": "rimraf dist && tsc",
2020
"prepare": "npm run build"

packages/graphql-playground-middleware-koa/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground-middleware-koa",
3-
"version": "1.3.6",
3+
"version": "1.3.7",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-koa",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [
@@ -14,7 +14,7 @@
1414
"files": [
1515
"dist"
1616
],
17-
"playgroundVersion": "1.3.21",
17+
"playgroundVersion": "1.3.22",
1818
"scripts": {
1919
"build": "rimraf dist && tsc",
2020
"prepare": "npm run build"

packages/graphql-playground-middleware-lambda/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground-middleware-lambda",
3-
"version": "1.3.7",
3+
"version": "1.3.9",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-lambada",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [
@@ -14,7 +14,7 @@
1414
"files": [
1515
"dist"
1616
],
17-
"playgroundVersion": "1.3.21",
17+
"playgroundVersion": "1.3.22",
1818
"scripts": {
1919
"build": "rimraf dist && tsc",
2020
"prepare": "npm run build"

packages/graphql-playground-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground-react",
3-
"version": "1.3.21",
3+
"version": "1.3.22",
44
"main": "./lib/lib.js",
55
"typings": "./lib/lib.d.ts",
66
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",

scripts/release-react.sh

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,36 @@ cd packages
66

77
middlewares=(
88
graphql-playground-middleware-express
9-
# graphql-playground-middleware-hapi
10-
# graphql-playground-middleware-koa
9+
graphql-playground-middleware-hapi
10+
graphql-playground-middleware-koa
1111
graphql-playground-middleware-lambda
1212
)
1313

1414
cd graphql-playground-react
1515
echo "Releasing graphql-playground-react..."
1616
npm version patch --no-git-tag-version
1717
npm publish
18-
version=$(cat package.json | jq -r '.version')
18+
export version=$(cat package.json | jq -r '.version')
1919
cd ..
2020

21+
echo "Updating JSDeliver cache..."
22+
curl -X POST \
23+
http://purge.jsdelivr.net/ \
24+
-H 'cache-control: no-cache' \
25+
-H 'content-type: application/json' \
26+
-d '{
27+
"path": [
28+
"/npm/graphql-playground-react/middleware-build/static/css/main.css",
29+
"/npm/graphql-playground-react/middleware-build/static/js/main.js"
30+
]
31+
}'
32+
2133
for middleware in "${middlewares[@]}"
2234
do
2335
cd $middleware
2436
echo "Releasing ${middleware}..."
25-
cat package.json | jq ".playgroundVersion = \"$version\"" > package.json
37+
cat package.json | jq ".playgroundVersion = \"$version\"" > package.tmp.json
38+
mv package.tmp.json package.json
2639
npm version patch --no-git-tag-version
2740
npm publish
2841
cd ..
@@ -33,15 +46,3 @@ echo "Updating dependency & version in graphql-playground-electron..."
3346
yarn add graphql-playground-react@$version
3447
npm version patch --no-git-tag-version
3548
cd ..
36-
37-
echo "Updating JSDeliver cache..."
38-
curl -X POST \
39-
http://purge.jsdelivr.net/ \
40-
-H 'cache-control: no-cache' \
41-
-H 'content-type: application/json' \
42-
-d '{
43-
"path": [
44-
"/npm/graphql-playground-react/middleware-build/static/css/main.css",
45-
"/npm/graphql-playground-react/middleware-build/static/js/main.js"
46-
]
47-
}'

0 commit comments

Comments
 (0)