mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-28 00:52:29 +03:00
Merge pull request #1054 from atom/cz-fix-win32-scripts
Fix scripts on Windows
This commit is contained in:
commit
993cc75c15
@ -59,7 +59,8 @@
|
||||
"json-front-matter": "~0.1.3",
|
||||
"grunt-shell": "~0.3.1",
|
||||
"jasmine-node": "git://github.com/kevinsawicki/jasmine-node.git#short-stacks",
|
||||
"request": "~2.27.0"
|
||||
"request": "~2.27.0",
|
||||
"unzip": "~0.1.9"
|
||||
},
|
||||
"packageDependencies" : {
|
||||
"atom-light-ui": "0.5.0",
|
||||
|
@ -24,7 +24,7 @@ var commands = [
|
||||
joinCommands('cd vendor/apm', 'npm install --silent .'),
|
||||
'npm install --silent vendor/apm',
|
||||
echoNewLine,
|
||||
'node node_modules/.bin/apm install --silent'
|
||||
'node node_modules/atom-package-manager/bin/apm install --silent',
|
||||
];
|
||||
|
||||
process.chdir(path.dirname(__dirname));
|
||||
|
@ -5,8 +5,8 @@ var path = require('path');
|
||||
process.chdir(path.dirname(__dirname));
|
||||
|
||||
cp.safeExec('node script/bootstrap', function() {
|
||||
// ./node_modules/.bin/grunt "$@"
|
||||
var gruntPath = path.join('node_modules', '.bin', 'grunt');
|
||||
// node node_modules/grunt-cli/bin/grunt "$@"
|
||||
var gruntPath = path.join('node_modules', 'grunt-cli', 'bin', 'grunt');
|
||||
var args = [gruntPath].concat(process.argv.slice(2));
|
||||
cp.safeSpawn(process.execPath, args, process.exit);
|
||||
});
|
||||
|
@ -32,8 +32,8 @@ cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
|
||||
async.series([
|
||||
require('rimraf').bind(global, path.join(homeDir, '.atom')),
|
||||
cp.safeExec.bind(global, 'git clean -dff'),
|
||||
cp.safeExec.bind(global, 'node node_modules/.bin/apm clean'),
|
||||
cp.safeExec.bind(global, 'node node_modules/.bin/grunt ci --stack --no-color'),
|
||||
cp.safeExec.bind(global, 'node node_modules/atom-package-manager/bin/apm clean'),
|
||||
cp.safeExec.bind(global, 'node node_modules/grunt-cli/bin/grunt ci --stack --no-color'),
|
||||
], function(error) {
|
||||
process.exit(error ? 1 : 0);
|
||||
});
|
||||
|
@ -5,5 +5,5 @@ var path = require('path');
|
||||
process.chdir(path.dirname(__dirname));
|
||||
|
||||
safeExec('node script/bootstrap', function() {
|
||||
safeExec('node node_modules/.bin/grunt ci --stack --no-color', process.exit);
|
||||
safeExec('node node_modules/grunt-cli/bin/grunt ci --stack --no-color', process.exit);
|
||||
});
|
||||
|
@ -4,6 +4,7 @@ os = require 'os'
|
||||
|
||||
request = require 'request'
|
||||
formidable = require 'formidable'
|
||||
unzip = require 'unzip'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
{spawn, mkdir, rm, cp} = require('./task-helpers')(grunt)
|
||||
@ -148,9 +149,20 @@ module.exports = (grunt) ->
|
||||
grunt.log.writeln('Unzipping atom-shell')
|
||||
directoryPath = path.dirname(zipPath)
|
||||
|
||||
spawn {cmd: 'unzip', args: [zipPath, '-d', directoryPath]}, (error) ->
|
||||
rm(zipPath)
|
||||
callback(error)
|
||||
if process.platform is 'darwin'
|
||||
# The zip archive of darwin build contains symbol links, only the "unzip"
|
||||
# command can handle it correctly.
|
||||
spawn {cmd: 'unzip', args: [zipPath, '-d', directoryPath]}, (error) ->
|
||||
rm(zipPath)
|
||||
callback(error)
|
||||
else
|
||||
fileStream = fs.createReadStream(zipPath)
|
||||
fileStream.on('error', callback)
|
||||
zipStream = fileStream.pipe(unzip.Extract(path: directoryPath))
|
||||
zipStream.on('error', callback)
|
||||
zipStream.on 'close', ->
|
||||
rm(zipPath)
|
||||
callback(null)
|
||||
|
||||
rebuildNativeModules = (previousVersion, callback) ->
|
||||
newVersion = getAtomShellVersion()
|
||||
|
Loading…
Reference in New Issue
Block a user