mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "The Meteor command-line tool",
|
||||
version: '1.3.4_3'
|
||||
version: '1.3.4_4'
|
||||
});
|
||||
|
||||
Package.includeTool();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"track": "METEOR",
|
||||
"version": "1.3.4.3-rc.2",
|
||||
"version": "1.3.4.4-rc.0",
|
||||
"recommended": false,
|
||||
"official": false,
|
||||
"description": "Meteor"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"track": "METEOR",
|
||||
"version": "1.3.4.3",
|
||||
"version": "1.3.4.4",
|
||||
"recommended": false,
|
||||
"official": true,
|
||||
"description": "The Official Meteor Distribution"
|
||||
|
||||
27
tools/cli/dev-bundle-links.js
Normal file
27
tools/cli/dev-bundle-links.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var fs = require("fs");
|
||||
|
||||
exports.makeLink = function (target, linkPath) {
|
||||
var tempPath = linkPath + "-" + Math.random().toString(36).slice(2);
|
||||
|
||||
try {
|
||||
fs.symlinkSync(target, tempPath, "junction");
|
||||
} catch (e) {
|
||||
fs.writeFileSync(tempPath, target, "utf8");
|
||||
}
|
||||
|
||||
fs.renameSync(tempPath, linkPath);
|
||||
};
|
||||
|
||||
exports.readLink = function (linkPath) {
|
||||
var stat = fs.lstatSync(linkPath);
|
||||
|
||||
if (stat.isSymbolicLink()) {
|
||||
return fs.realpathSync(linkPath);
|
||||
}
|
||||
|
||||
if (stat.isFile()) {
|
||||
return fs.readFileSync(linkPath, "utf8");
|
||||
}
|
||||
|
||||
return linkPath;
|
||||
};
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var links = require("./dev-bundle-links.js");
|
||||
var rootDir = path.resolve(__dirname, "..", "..");
|
||||
var defaultDevBundlePromise =
|
||||
Promise.resolve(path.join(rootDir, "dev_bundle"));
|
||||
@@ -31,10 +32,10 @@ function getDevBundleDir() {
|
||||
"dev_bundle"
|
||||
);
|
||||
|
||||
var devBundleStat = statOrNull(devBundleLink, "isDirectory");
|
||||
var devBundleStat = statOrNull(devBundleLink);
|
||||
if (devBundleStat) {
|
||||
return new Promise(function (resolve) {
|
||||
resolve(fs.realpathSync(devBundleLink));
|
||||
resolve(links.readLink(devBundleLink));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ function getDevBundleDir() {
|
||||
|
||||
return getDevBundleForRelease(release).then(function (devBundleDir) {
|
||||
if (devBundleDir) {
|
||||
fs.symlink(devBundleDir, devBundleLink, "junction");
|
||||
links.makeLink(devBundleDir, devBundleLink);
|
||||
return devBundleDir;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
# This file intentionally left empty to ensure consistent npm
|
||||
# configuration.
|
||||
# These configuration options govern `npm` commands run on behalf of
|
||||
# Meteor packages that have `Npm.depends` calls in their package.js files,
|
||||
# not `meteor npm ...` commands. Because the developer is not running
|
||||
# these commands herself, we don't care as much about helpful warnings,
|
||||
# and we certainly don't want them to obscure actual errors.
|
||||
|
||||
loglevel = error
|
||||
|
||||
@@ -1386,12 +1386,9 @@ _.extend(exports.ReleaseFile.prototype, {
|
||||
}
|
||||
}
|
||||
|
||||
files.symlink(
|
||||
newTarget,
|
||||
devBundleLink,
|
||||
// Since the target is a directory, Windows can create a junction
|
||||
// without needing administrator privileges.
|
||||
"junction"
|
||||
require("./cli/dev-bundle-links.js").makeLink(
|
||||
files.convertToOSPath(newTarget),
|
||||
files.convertToOSPath(devBundleLink)
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user