Merge pull request #7377 from meteor/release-1.3.4.4

Release 1.3.4.4
This commit is contained in:
Ben Newman
2016-07-10 17:35:54 +00:00
committed by GitHub
7 changed files with 44 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "The Meteor command-line tool",
version: '1.3.4_3'
version: '1.3.4_4'
});
Package.includeTool();

View File

@@ -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"

View File

@@ -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"

View 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;
};

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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)
);
},