Skip to content

Commit 2ee16d1

Browse files
committed
added scripts
1 parent 6708391 commit 2ee16d1

File tree

6 files changed

+83
-5
lines changed

6 files changed

+83
-5
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
steps:
99
- checkout
1010
- run: sudo npm i -g yarn
11+
- run: yarn show-versions
1112
- run: cd packages/graphql-playground-react && yarn
1213
- run: cd packages/graphql-playground-react && yarn build
1314

@@ -22,6 +23,7 @@ jobs:
2223
security unlock-keychain -p travis build.keychain
2324
echo $CERTIFICATE_OSX_P12 | base64 --decode > certificate.p12
2425
security import certificate.p12 -k build.keychain -P $CERTIFICATE_OSX_PASSWORD -T /usr/bin/codesign
26+
# needed for signing in CI environments (don't ask...)
2527
security set-key-partition-list -S apple-tool:,apple: -s -k travis build.keychain
2628
- run: sudo npm i -g yarn
2729
# needed for release process

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"packages/*"
55
],
66
"scripts": {
7-
"build": "bash scripts/build.sh"
7+
"build": "bash scripts/build.sh",
8+
"show-versions": "bash scripts/versions.sh",
9+
"release-html": "bash scripts/release-html.sh",
10+
"release-react": "bash scripts/release-react.sh"
811
},
912
"devDependencies": {
1013
"@types/node": "^8.5.2",

scripts/release-html.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
cd packages
6+
7+
middlewares=(
8+
graphql-playground-middleware-express
9+
# graphql-playground-middleware-hapi
10+
# graphql-playground-middleware-koa
11+
# graphql-playground-middleware-lambda
12+
)
13+
14+
cd graphql-playground-html
15+
echo "Releasing graphql-playground-html..."
16+
npm version patch --no-git-tag-version
17+
npm publish
18+
cd ..
19+
20+
for middleware in "${middlewares[@]}"
21+
do
22+
cd $middleware
23+
echo "Releasing ${middleware}..."
24+
yarn add graphql-playground-html
25+
npm version patch --no-git-tag-version
26+
npm publish
27+
cd ..
28+
done

scripts/release-react.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
cd packages
6+
7+
middlewares=(
8+
graphql-playground-middleware-express
9+
# graphql-playground-middleware-hapi
10+
# graphql-playground-middleware-koa
11+
# graphql-playground-middleware-lambda
12+
)
13+
14+
cd graphql-playground-html
15+
echo "Releasing graphql-playground-react..."
16+
npm version patch --no-git-tag-version
17+
npm publish
18+
cd ..
19+
20+
for middleware in "${middlewares[@]}"
21+
do
22+
cd $middleware
23+
echo "Releasing ${middleware}..."
24+
yarn add graphql-playground-react
25+
npm version patch --no-git-tag-version
26+
npm publish
27+
cd ..
28+
done

scripts/release.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/versions.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
#!/bin/bash
22

3-
set -e
3+
set -e
4+
5+
cd packages
6+
7+
packages=(
8+
graphql-playground-react
9+
graphql-playground-html
10+
graphql-playground-electron
11+
graphql-playground-middleware-express
12+
graphql-playground-middleware-hapi
13+
graphql-playground-middleware-koa
14+
graphql-playground-middleware-lambda
15+
)
16+
17+
for pkg in "${packages[@]}"
18+
do
19+
cd $pkg
20+
version=$(cat package.json | jq -r '.version')
21+
echo "$pkg: $version"
22+
cd ..
23+
done

0 commit comments

Comments
 (0)