Skip to content

Commit

Permalink
working deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
James Baxley committed Sep 12, 2017
1 parent 4d2a7e0 commit f387ae6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"coverage": "lerna run -- coverage",
"coverage:upload": "codecov",
"danger": "danger run --verbose",
"predeploy": "npm run build && npm test",
"prexdeploy": "npm run build && npm test",
"deploy":
"lerna publish -m \"chore: Publish\" --independent --cd-version=prerelease --preid=alpha --npm-tag=alpha"
"lerna publish -m \"chore: Publish\" --independent --cd-version=prerelease --preid=alpha --npm-tag=alpha && cd packages/apollo-client && npm run deploy"
},
"bundlesize": [
{
Expand Down
22 changes: 11 additions & 11 deletions packages/apollo-client/scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh -e

cd "$(dirname "$0")" && cd ../

# When we publish to npm, the published files are available in the root
# directory, which allows for a clean include or require of sub-modules.
Expand All @@ -16,16 +16,15 @@ node -e "var package = require('./package.json'); \
"

# Compile new files
npm run compile
npm run build

# Make sure the ./npm directory is empty
rm -rf ./npm
mkdir ./npm

# Copy all files from ./lib/src to /npm
cd ./lib/src && cp -r ./ ../../npm/
cd ./lib && cp -r ./ ../npm/
# Copy also the umd bundle with the source map file
cd ../
cp apollo.umd.js ../npm/ && cp apollo.umd.js.map ../npm/

# Back to the root directory
Expand All @@ -35,6 +34,8 @@ cd ../
# The built output as requiring any further transformation.
node -e "var package = require('./package.json'); \
delete package.babel; \
delete package.jest; \
delete package.private; \
delete package.scripts; \
delete package.options; \
package.main = 'apollo.umd.js'; \
Expand All @@ -50,13 +51,12 @@ node -e "var package = require('./package.json'); \


# Copy few more files to ./npm
cp README.md npm/
cp LICENSE npm/
cp src/index.js.flow npm/
cp ../../README.md npm/
cp ../../LICENSE npm/
# please keep this in sync with the filename used in package.main
cp src/index.js.flow npm/apollo.umd.js.flow
# cp src/index.js.flow npm/
# cp src/index.js.flow npm/apollo.umd.js.flow
# flow typings
cp -R flow-typed npm/
# cp -R flow-typed npm/

echo 'deploying to npm...'
cd npm && npm publish --tag alpha
cd npm && npm publish --tag=alpha

0 comments on commit f387ae6

Please sign in to comment.