mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-28 09:01:33 +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",
|
"json-front-matter": "~0.1.3",
|
||||||
"grunt-shell": "~0.3.1",
|
"grunt-shell": "~0.3.1",
|
||||||
"jasmine-node": "git://github.com/kevinsawicki/jasmine-node.git#short-stacks",
|
"jasmine-node": "git://github.com/kevinsawicki/jasmine-node.git#short-stacks",
|
||||||
"request": "~2.27.0"
|
"request": "~2.27.0",
|
||||||
|
"unzip": "~0.1.9"
|
||||||
},
|
},
|
||||||
"packageDependencies" : {
|
"packageDependencies" : {
|
||||||
"atom-light-ui": "0.5.0",
|
"atom-light-ui": "0.5.0",
|
||||||
|
@ -24,7 +24,7 @@ var commands = [
|
|||||||
joinCommands('cd vendor/apm', 'npm install --silent .'),
|
joinCommands('cd vendor/apm', 'npm install --silent .'),
|
||||||
'npm install --silent vendor/apm',
|
'npm install --silent vendor/apm',
|
||||||
echoNewLine,
|
echoNewLine,
|
||||||
'node node_modules/.bin/apm install --silent'
|
'node node_modules/atom-package-manager/bin/apm install --silent',
|
||||||
];
|
];
|
||||||
|
|
||||||
process.chdir(path.dirname(__dirname));
|
process.chdir(path.dirname(__dirname));
|
||||||
|
@ -5,8 +5,8 @@ var path = require('path');
|
|||||||
process.chdir(path.dirname(__dirname));
|
process.chdir(path.dirname(__dirname));
|
||||||
|
|
||||||
cp.safeExec('node script/bootstrap', function() {
|
cp.safeExec('node script/bootstrap', function() {
|
||||||
// ./node_modules/.bin/grunt "$@"
|
// node node_modules/grunt-cli/bin/grunt "$@"
|
||||||
var gruntPath = path.join('node_modules', '.bin', 'grunt');
|
var gruntPath = path.join('node_modules', 'grunt-cli', 'bin', 'grunt');
|
||||||
var args = [gruntPath].concat(process.argv.slice(2));
|
var args = [gruntPath].concat(process.argv.slice(2));
|
||||||
cp.safeSpawn(process.execPath, args, process.exit);
|
cp.safeSpawn(process.execPath, args, process.exit);
|
||||||
});
|
});
|
||||||
|
@ -32,8 +32,8 @@ cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
|
|||||||
async.series([
|
async.series([
|
||||||
require('rimraf').bind(global, path.join(homeDir, '.atom')),
|
require('rimraf').bind(global, path.join(homeDir, '.atom')),
|
||||||
cp.safeExec.bind(global, 'git clean -dff'),
|
cp.safeExec.bind(global, 'git clean -dff'),
|
||||||
cp.safeExec.bind(global, 'node node_modules/.bin/apm clean'),
|
cp.safeExec.bind(global, 'node node_modules/atom-package-manager/bin/apm clean'),
|
||||||
cp.safeExec.bind(global, 'node node_modules/.bin/grunt ci --stack --no-color'),
|
cp.safeExec.bind(global, 'node node_modules/grunt-cli/bin/grunt ci --stack --no-color'),
|
||||||
], function(error) {
|
], function(error) {
|
||||||
process.exit(error ? 1 : 0);
|
process.exit(error ? 1 : 0);
|
||||||
});
|
});
|
||||||
|
@ -5,5 +5,5 @@ var path = require('path');
|
|||||||
process.chdir(path.dirname(__dirname));
|
process.chdir(path.dirname(__dirname));
|
||||||
|
|
||||||
safeExec('node script/bootstrap', function() {
|
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'
|
request = require 'request'
|
||||||
formidable = require 'formidable'
|
formidable = require 'formidable'
|
||||||
|
unzip = require 'unzip'
|
||||||
|
|
||||||
module.exports = (grunt) ->
|
module.exports = (grunt) ->
|
||||||
{spawn, mkdir, rm, cp} = require('./task-helpers')(grunt)
|
{spawn, mkdir, rm, cp} = require('./task-helpers')(grunt)
|
||||||
@ -148,9 +149,20 @@ module.exports = (grunt) ->
|
|||||||
grunt.log.writeln('Unzipping atom-shell')
|
grunt.log.writeln('Unzipping atom-shell')
|
||||||
directoryPath = path.dirname(zipPath)
|
directoryPath = path.dirname(zipPath)
|
||||||
|
|
||||||
spawn {cmd: 'unzip', args: [zipPath, '-d', directoryPath]}, (error) ->
|
if process.platform is 'darwin'
|
||||||
rm(zipPath)
|
# The zip archive of darwin build contains symbol links, only the "unzip"
|
||||||
callback(error)
|
# 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) ->
|
rebuildNativeModules = (previousVersion, callback) ->
|
||||||
newVersion = getAtomShellVersion()
|
newVersion = getAtomShellVersion()
|
||||||
|
Loading…
Reference in New Issue
Block a user