mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Factor out making latest meteor "symlink"
This commit is contained in:
@@ -2143,12 +2143,11 @@ main.registerCommand({
|
||||
var toolRecord = _.findWhere(toolIsopack.toolsOnDisk, {arch: osArch});
|
||||
if (!toolRecord)
|
||||
throw Error("missing tool for " + osArch);
|
||||
files.symlink(
|
||||
files.pathJoin(
|
||||
|
||||
tmpTropo.linkToLatestMeteor(files.pathJoin(
|
||||
tmpTropo.packagePath(toolPackage, toolVersion, true),
|
||||
toolRecord.path,
|
||||
'meteor'),
|
||||
files.pathJoin(tmpTropo.root, 'meteor'));
|
||||
'meteor'));
|
||||
|
||||
files.createTarball(
|
||||
tmpTropo.root,
|
||||
|
||||
@@ -434,9 +434,9 @@ _.extend(exports.Tropohouse.prototype, {
|
||||
return files.readlink(linkPath);
|
||||
},
|
||||
|
||||
replaceLatestMeteorSymlink: function (linkText) {
|
||||
linkToLatestMeteor: function (scriptLocation) {
|
||||
var self = this;
|
||||
var linkPath = files.pathJoin(self.root, 'meteor');
|
||||
files.symlinkOverSync(linkText, linkPath);
|
||||
files.symlinkOverSync(scriptLocation, linkPath);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -197,7 +197,7 @@ var updateMeteorToolSymlink = function () {
|
||||
if (!toolRecord)
|
||||
throw Error("latest release has no tool?");
|
||||
|
||||
tropohouse.default.replaceLatestMeteorSymlink(
|
||||
files.pathJoin(relativeToolPath, toolRecord.path, 'meteor'));
|
||||
tropohouse.default.linkToLatestMeteor(files.pathJoin(
|
||||
relativeToolPath, toolRecord.path, 'meteor'));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user