patch releases need to be recommended

for them to work with update --patch

or for them to be advertised
This commit is contained in:
David Glasser
2014-08-25 14:13:05 -07:00
parent 6c7a29683c
commit ca7217bc18
2 changed files with 16 additions and 5 deletions

View File

@@ -1403,6 +1403,14 @@ main.registerCommand({
"You are at the latest patch version.\n");
return 1;
}
var patchRecord = doOrDie(function () {
return catalog.official.getReleaseVersion(r[0], updateTo);
});
if (!patchRecord || !patchRecord.recommended) {
process.stderr.write(
"You are at the latest patch version.\n");
return 1;
}
releaseVersionsToTry = [updateTo];
} else if (release.forced) {
doOrDie(function () {

View File

@@ -104,11 +104,14 @@ var maybeShowBanners = function () {
var track = release.current.getReleaseTrack();
var patchReleaseVersion = releaseData.patchReleaseVersion;
if (patchReleaseVersion) {
runLog.log("=> A patch (" +
utils.displayRelease(track, patchReleaseVersion) +
") for your current release is available!");
runLog.log(" Update this project now with 'meteor update --patch'.");
return;
var patchRelease = catalog.official.getReleaseVersion(track, patchRelease);
if (patchRelease && patchRelease.recommended) {
runLog.log("=> A patch (" +
utils.displayRelease(track, patchReleaseVersion) +
") for your current release is available!");
runLog.log(" Update this project now with 'meteor update --patch'.");
return;
}
}
// There's no patch (so no urgent exclamation!) but there may be something