forked from wvanbergen/node-vertica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cakefile
25 lines (19 loc) · 859 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ exec, spawn } = require 'child_process'
print = (data) -> console.log data.toString().trim()
task 'build', ->
exec 'mkdir -p lib && coffee --bare -c -o lib src'
task 'clean', ->
exec 'rm -rf lib'
task 'dev', 'Continuous compilation', ->
coffee = spawn 'coffee', '-wc --bare -o lib src'.split(' ')
coffee.stdout.on 'data', print
coffee.stderr.on 'data', print
task 'test', ->
exec 'vows test/*.coffee', (error, stdout, stderr) ->
print stdout
print stderr
task 'tag', ->
throw "Please do not run this task directly, use npm publish instead." unless process.env.npm_package_name? && process.env.npm_package_version?
exec "git tag -m 'Tagged #{process.env.npm_package_name} version #{process.env.npm_package_version}.' '#{process.env.npm_package_name}-#{process.env.npm_package_version}'"
task 'push', ->
exec "git push --tags"