Skip to content
This repository has been archived by the owner on Sep 9, 2019. It is now read-only.

Commit

Permalink
Use central shipitfile
Browse files Browse the repository at this point in the history
  • Loading branch information
foucdeg committed Nov 10, 2018
1 parent 9c801f9 commit 980efb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -15,8 +15,9 @@
"shipit-yarn": "^0.2.0"
},
"scripts": {
"client:build": "cd client && yarn build",
"client:start": "cd client && yarn start",
"start": "MAP_SERVER_PORT=9000 node ./server/server.js",
"server:start": "MAP_SERVER_PORT=9000 node ./server/server.js",
"fake": "node ./tools/faker.js"
},
"dependencies": {
Expand Down
9 changes: 8 additions & 1 deletion server/shipitfile.js → shipitfile.js
Expand Up @@ -15,10 +15,12 @@ module.exports = function shipitConfig(shipit) {
keepReleases: 3,
deleteOnRollback: false,
shallowClone: true,
updateSubmodules: true,
yarn: {
remote: true,
cmd: 'client:build'
},
up
},
prod: {
servers: [
Expand Down Expand Up @@ -51,10 +53,15 @@ module.exports = function shipitConfig(shipit) {

shipit.task('chmod-release', () => {
shipit.remote(`chmod a+x ${shipit.releasePath}`);
});
})

shipit.on('updated', () => {
shipit.start('chmod-release');
shipit.emit('chmodded');
});

shipit.on('yarn_installed', () => {
shipit.start('yarn:run');
shipit.emit('built');
});
};

0 comments on commit 980efb2

Please sign in to comment.