Permalink
Browse files

Add nodejs update snippet

  • Loading branch information...
1 parent 0c52143 commit 4f66c40d1e487f45793a2e6e8e7221b45fefe969 @1602 committed Oct 4, 2012
Showing with 26 additions and 1 deletion.
  1. +25 −0 README.md
  2. +1 −1 package.json
View
@@ -91,6 +91,31 @@ namespace 'deploy', ->
task 'stop', (done) -> run "cd #{roco.currentPath}; forever stop"
```
+## Another snippets
+
+### Update nodejs on server(s)
+
+~/.roco.coffee:
+
+```coffee-script
+set 'nodever', '0.8.10'
+namespace 'node', ->
+ task 'update', (done) -> sequence 'download', 'unpack', 'compile', 'install', done
+ task 'rebuild', (done) -> sequence 'unpack', 'compile', 'install', done
+ task 'download', (done) ->
+ run "cd /tmp && wget http://nodejs.org/dist/v#{roco.nodever}/node-v#{roco.nodever}.tar.gz", done
+ task 'unpack', (done) ->
+ run "cd /tmp && tar xfv node-v#{roco.nodever}.tar.gz", done
+ task 'compile', (done) ->
+ run "cd /tmp/node-v#{roco.nodever} && ./configure && make", done
+ task 'install', (done) ->
+ run "cd /tmp/node-v#{roco.nodever} && sudo make install", done
+```
+
+Example: update nodejs on `localhost` and `railwayjs.com` hosts
+
+ HOSTS=localhost,railwayjs.com roco node:update
+
## License
MIT
View
@@ -2,7 +2,7 @@
"author": "Anatoliy Chakkaev <rpm1602 at gmail dot com>",
"name": "roco",
"description": "Deploy app to remote server via ssh",
- "version": "0.0.4",
+ "version": "0.0.5",
"repository": {
"type": "git",
"url": "git@github.com:1602/roco.git"

0 comments on commit 4f66c40

Please sign in to comment.