From 1757ff18f28fa43c58d9258f03f051592982737b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 21 Jul 2014 16:52:20 -0700 Subject: [PATCH] Write control/desktop files to build dir --- build/package.json | 1 - build/tasks/mkdeb-task.coffee | 20 ++++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/build/package.json b/build/package.json index a7dc2b2b1..8b2d55027 100644 --- a/build/package.json +++ b/build/package.json @@ -34,7 +34,6 @@ "request": "~2.27.0", "rimraf": "~2.2.2", "runas": "0.5.x", - "temp": "^0.8.0", "underscore-plus": "1.x", "unzip": "~0.1.9", "vm-compatibility-layer": "~0.1.0" diff --git a/build/tasks/mkdeb-task.coffee b/build/tasks/mkdeb-task.coffee index 98f1c797b..502b797c1 100644 --- a/build/tasks/mkdeb-task.coffee +++ b/build/tasks/mkdeb-task.coffee @@ -1,22 +1,18 @@ fs = require 'fs' path = require 'path' _ = require 'underscore-plus' -temp = require 'temp' - -temp.track() -tempResourcesFolder = temp.mkdirSync('atom-resources-') - -fillTemplate = (filePath, data) -> - template = _.template(String(fs.readFileSync("#{filePath}.in"))) - filled = template(data) - - outputPath = path.join(tempResourcesFolder, path.basename(filePath)) - fs.writeFileSync(outputPath, filled) - outputPath module.exports = (grunt) -> {spawn} = require('./task-helpers')(grunt) + fillTemplate = (filePath, data) -> + template = _.template(String(fs.readFileSync("#{filePath}.in"))) + filled = template(data) + + outputPath = path.join(grunt.config.get('atom.buildDir'), path.basename(filePath)) + fs.writeFileSync(outputPath, filled) + outputPath + grunt.registerTask 'mkdeb', 'Create debian package', -> done = @async()