Skip to content

Commit

Permalink
fix(cd): update readme, have deploy script return, run deploy script …
Browse files Browse the repository at this point in the history
…directly
  • Loading branch information
kevinchappell committed Nov 6, 2018
1 parent 82a775f commit 1916870
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ jobs:
provider: script
script:
- yarn travis-deploy-once "yarn semantic-release"
- yarn deploy
skip_cleanup: true
after_deploy:
- yarn deploy
env:
global:
- secure: Fzq6BMwpDtUVH6ONSD5cg3gxDl/6bL9d4xoCnb1Ck3jhLen7GVSBCVs8dTPP0J1kMUbcPfywdG5CrdTMUXtuT3i7uVEqDxemkWYLyKwtvtqWPSFFTS9WvLnoxPvpTnDDoXvU9DhZoFP5U6nEELZIcqJceGwpDReROvJM1LKug72su7LHG40FWPj3w1X5XvMMKZlp6ClFwHZYDs7ybDcWlz6s2TsdunW0JW15+KMEDVuPTKw5VVk6ytnC3j3XXNus8ARRH/vG7DWCOtOai2ckYHchqz9c37oms5xA8nT4+J4Se/sgvkZo/jfa5tJSOljppUxMwyyNdkEu3QIEVNPgBtQf34KhWFN+FivuZHK4qG12lyQvRcJYlBJvUeSp29KABZv8oESIso5/HD8cIOEVCLUXjhOkcLF8S6cSRag0+/PT0u7Aj/L0ONKNsYhikOM773ilmbt8Vb7tjSOi7aoLJBmUlNVJcT4wJwJFjoe7bUppeqj1pC/+2+aX/IJDX6LfX6kpSxKGUH/DfJpEXq0xjCfsa8aap2gXfbn9Exsynx6KlIyAMRkmTU7S7iMiBts1fKMZvks3wA8rR4b44EZO+qgP5EbTGhCsvLYl3f5TiRsJf+w9LQrtP4Vl8mOU0XFgfrKArGMp6KDp1x1cyF/X4LAO9ySSDu9IEUj7Ft3WyOs=
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A jQuery plugin for drag and drop form creation, formBuilder has many options an
**Example**
```javascript
jQuery($ => {
$('fb-editor').formBuilder();
$('#fb-editor').formBuilder();
})
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"build:vendor": "node tools/run build-vendor",
"build": "webpack --mode production -p --progress --config tools/webpack.config && yarn build:plugins && yarn copy",
"copy": "cp -a dist/* demo/assets/js/ && cp CONTRIBUTING.md docs/contributing.md && cp LICENSE docs/license.md",
"deploy": "yarn build && node tools/run deploy",
"deploy": "yarn build && node tools/deploy",
"docs": "mkdocs build",
"font": "node tools/run icon-font",
"lint": "eslint ./src --ext .js || true",
Expand Down
27 changes: 13 additions & 14 deletions tools/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,25 @@ import { exec } from 'child_process'

const onFinish = (err, cb) => {
if (!err) {
cb()
return cb()
} else {
console.error(err)
return process.exit(1)
}
}

const deploySiteCommands = [
'git submodule update --init --recursive',
'yarn docs',
'cd site',
'yarn deploy',
'cd ../'
]
const deploySiteCommands = ['git submodule update --init --recursive', 'yarn docs', 'cd site', 'yarn deploy', 'cd ../']

// Deploy the demo and site.
const deploy = async () => exec('git push origin $(git subtree split --prefix demo $(git rev-parse --abbrev-ref HEAD)):gh-pages --force', err => {
onFinish(err, () => {
console.log('Demo successfully deployed')
exec(deploySiteCommands.join(' && '), err => onFinish(err, () => console.log('Site successfully deployed')))
})
})
const deploy = () => exec(
'git push origin $(git subtree split --prefix demo $(git rev-parse --abbrev-ref HEAD)):gh-pages --force',
err =>
onFinish(err, () => {
console.log('Demo successfully deployed')
return exec(deploySiteCommands.join(' && '), err =>
onFinish(err, () => console.log('Site successfully deployed'))
)
})
)

export default deploy
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2185,8 +2185,8 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000906.tgz#9a9e43b8690f9a0937c9fdf5e4699eee8516b982"

caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000899:
version "1.0.30000905"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000905.tgz#8f731ecf5b8553c7154a691c3df3a635a1a3fda5"
version "1.0.30000906"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000906.tgz#7c44e498a2504f7a5db3b4f91285bbc821157a77"

capture-stack-trace@^1.0.0:
version "1.0.1"
Expand Down

0 comments on commit 1916870

Please sign in to comment.