Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into bottom-button
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jun 7, 2017
2 parents d2ad3f3 + 27d0542 commit bebc9c3
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ coverage
# Use a custom, cached location for Jest to save transpiling
# on every PR
.jest/cache

# A commit deploy using `yarn bundle-with-storybooks` generates these
Emission.js
Emission.js.meta
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ node_js:
- "6.7"

script:
- scripts/deploy_commit.sh
- yarn ci
- yarn danger -- run -t
- yarn danger

deploy:
provider: script
Expand Down
3 changes: 2 additions & 1 deletion dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,6 @@ const newBody = userBody + splitter + "\n" + bodyFooter
// require Danger to submit a new body (and thus overwrite those changes.)
const neuterMarkdownTicks = /- \[*.\]/g
if (pr.body.replace(neuterMarkdownTicks, "-") !== newBody.replace(neuterMarkdownTicks, "-")) {
danger.github.api.pullRequests.update({...danger.github.thisPR, body: newBody })
// See https://github.com/artsy/emission/issues/589
// danger.github.api.pullRequests.update({...danger.github.thisPR, body: newBody })
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.ios.js",
"scripts": {
"bundle": "react-native bundle --config \"$(pwd)\"/rn-cli.config.js --platform=ios --dev=false --entry-file=index.ios.js --bundle-output Pod/Assets/Emission.js --sourcemap-output Pod/Assets/Emission.js.map --assets-dest Pod/Assets && rm -rf Pod/Assets/assets/node_modules",
"bundle-with-storybooks": "react-native bundle --config \"$(pwd)\"/rn-cli.config.js --platform=ios --dev=true --entry-file=Example/Emission/index.ios.js --bundle-output Emission.js --assets-dest Pod/Assets",
"clean-example": "cd Example && xcodebuild -workspace Emission.xcworkspace -scheme Emission -destination 'platform=iOS Simulator,name=iPhone 6' clean",
"type-check": "tsc --noEmit --pretty",
"lint": "tslint 'src/**/*.{ts,tsx}'",
Expand Down
15 changes: 15 additions & 0 deletions scripts/deploy_commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

if [ -z "$TRAVIS_PULL_REQUEST" ]; then
echo "Skipping deploy of the commit"
exit 0
fi

# Give us a CLI to work with
yarn global add s3-cli

# Createa bundle with embedded storybooks also into Emission.js
yarn bundle-with-storybooks

# Uploads the file to our s3 bucket - credentials are in the ENV vars for same-repo PRs
s3-cli put Emission.js "s3://artsy-emission-js/$TRAVIS_PULL_REQUEST.js"

0 comments on commit bebc9c3

Please sign in to comment.