Clear the releases dir for now

This commit is contained in:
Paul Betts
2014-09-22 10:47:27 -07:00
parent 1080eb2d11
commit 5230d040eb

View File

@@ -1,6 +1,7 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
rimraf = require 'rimraf'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
@@ -33,7 +34,12 @@ module.exports = (grunt) ->
pkgs = pkg for pkg in fs.readdirSync(buildDir) when pkg.match /.nupkg$/i
cmd = 'build/windows/update.com'
args = ['--releasify', path.join(buildDir, pkgs), '-r', path.join(buildDir, 'Releases')]
releasesDir = path.join(buildDir, 'Releases')
## NB: Gonna clear Releases for now, in the future we need to pull down
## the existing version
rimraf.sync(releasesDir)
cmd = 'build/windows/update.com'
args = ['--releasify', path.join(buildDir, pkgs), '-r', releasesDir]
spawn {cmd, args}, (error, result, code) -> done(error)