mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge branch 'release-0.9.0' into devel
This commit is contained in:
@@ -2178,8 +2178,8 @@ Template.api.pack_versions = {
|
||||
"all packages will default to the versions released along with " +
|
||||
"`meteorversion`. This will save you from having to figure out the exact " +
|
||||
"versions of the core packages you want to use. For example, if the newest " +
|
||||
"release of meteor is METEOR-CORE@0.9.0 and it uses jquery@1.0.0, you can use " +
|
||||
"`api.versionsFrom('METEOR-CORE@0.9.0')`. If your package uses jQuery, it will " +
|
||||
"release of meteor is METEOR@0.9.0 and it uses jquery@1.0.0, you can use " +
|
||||
"`api.versionsFrom('METEOR@0.9.0')`. If your package uses jQuery, it will " +
|
||||
"automatically depend on jQuery 1.0.0 when it is published."],
|
||||
args: [
|
||||
{name: "meteorversion",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Given the set of the constraints, picks a satisfying configuration",
|
||||
version: "1.0.7"
|
||||
version: "1.0.8"
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "The Meteor command-line tool",
|
||||
version: '1.0.16'
|
||||
version: '1.0.17'
|
||||
});
|
||||
|
||||
Package.includeTool();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Parses Meteor Smart Package version string",
|
||||
version: "1.0.4"
|
||||
version: "1.0.5"
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
|
||||
10
scripts/admin/banners-oldcore.json
Normal file
10
scripts/admin/banners-oldcore.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{ "track": "METEOR-CORE",
|
||||
"banners": [
|
||||
{
|
||||
"versions": ["0.9.0-rc10", "0.9.0-rc11", "0.9.0-rc12"],
|
||||
"banner": {
|
||||
"text": "We changed the name of the core Meteor release track from METEOR-CORE\nto METEOR. Update to the current rc with `meteor update --release METEOR@0.9.0-rc13`.\nMeteor 0.9.0 is coming soon; thanks for helping test the release candidates!"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ "track": "METEOR-CORE",
|
||||
{ "track": "METEOR",
|
||||
"banners": [
|
||||
{
|
||||
"versions": ["0.9.0-preview1", "0.9.0-preview2", "0.9.0-preview3"],
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"track": "METEOR-CORE",
|
||||
"version": "0.9.0-rc12",
|
||||
"track": "METEOR",
|
||||
"version": "0.9.0-rc14",
|
||||
"patchFrom": ["0.9.0-rc13"],
|
||||
"recommended": false,
|
||||
"official": true,
|
||||
"description": "An experimental release of meteor."
|
||||
"description": "The official Meteor distribution."
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"track": "METEOR-CORE",
|
||||
"track": "METEOR",
|
||||
"version": "0.9.0",
|
||||
"recommended": false,
|
||||
"official": true,
|
||||
|
||||
@@ -22,7 +22,7 @@ var Fiber = require('fibers');
|
||||
|
||||
var catalog = exports;
|
||||
|
||||
catalog.DEFAULT_TRACK = 'METEOR-CORE';
|
||||
catalog.DEFAULT_TRACK = 'METEOR';
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -261,20 +261,34 @@ main.registerCommand({
|
||||
|
||||
// We have initialized everything, so perform the publish oepration.
|
||||
var ec; // XXX maybe combine with messages?
|
||||
messages = buildmessage.capture({
|
||||
title: "publishing the package"
|
||||
}, function () {
|
||||
ec = packageClient.publishPackage(
|
||||
packageSource, compileResult, conn, {
|
||||
new: options.create,
|
||||
existingVersion: options['existing-version']
|
||||
});
|
||||
});
|
||||
try {
|
||||
messages = buildmessage.capture({
|
||||
title: "publishing the package"
|
||||
}, function () {
|
||||
ec = packageClient.publishPackage(
|
||||
packageSource, compileResult, conn, {
|
||||
new: options.create,
|
||||
existingVersion: options['existing-version']
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
packageClient.handlePackageServerConnectionError(e);
|
||||
return 1;
|
||||
}
|
||||
if (messages.hasMessages()) {
|
||||
process.stderr.write(messages.formatMessages());
|
||||
return ec || 1;
|
||||
}
|
||||
|
||||
// We are only publishing one package, so we should close the connection, and
|
||||
// then exit with the previous error code.
|
||||
conn.close();
|
||||
|
||||
// If the publishPackage failed, exit now (no need to spend time trying to
|
||||
// refresh).
|
||||
if (ec)
|
||||
return ec;
|
||||
|
||||
// Warn the user if their package is not good for all architectures.
|
||||
var allArchs = compileResult.unipackage.buildArchitectures().split('+');
|
||||
if (_.any(allArchs, function (arch) {
|
||||
@@ -286,10 +300,7 @@ main.registerCommand({
|
||||
"Please use publish-for-arch to publish new builds of the package.\n\n");
|
||||
}
|
||||
|
||||
// We are only publishing one package, so we should close the connection, and
|
||||
// then exit with the previous error code.
|
||||
conn.close();
|
||||
|
||||
// Refresh, so that we actually learn about the thing we just published.
|
||||
refreshOfficialCatalogOrDie();
|
||||
|
||||
return ec;
|
||||
@@ -386,6 +397,10 @@ main.registerCommand({
|
||||
// it doesn't we should fail. Hopefully, of course, we have
|
||||
// tested our stuff before deciding to publish it to the package
|
||||
// server, but we need to be careful.
|
||||
// XXX If you're not using a matching version of the tool, this will give
|
||||
// an error like "Version lock for FOO should never change"! Including
|
||||
// if you've swapped between checkout and released tool. We really
|
||||
// should springboard here...
|
||||
var deps =
|
||||
compiler.determineBuildTimeDependencies(packageSource).packageDependencies;
|
||||
tropohouse.default.downloadMissingPackages(deps);
|
||||
@@ -410,11 +425,16 @@ main.registerCommand({
|
||||
return 1;
|
||||
}
|
||||
|
||||
messages = buildmessage.capture({
|
||||
title: "publishing package " + name
|
||||
}, function () {
|
||||
packageClient.createAndPublishBuiltPackage(conn, unipkg);
|
||||
});
|
||||
try {
|
||||
messages = buildmessage.capture({
|
||||
title: "publishing package " + name
|
||||
}, function () {
|
||||
packageClient.createAndPublishBuiltPackage(conn, unipkg);
|
||||
});
|
||||
} catch (e) {
|
||||
packageClient.handlePackageServerConnectionError(e);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (messages.hasMessages()) {
|
||||
process.stderr.write("\n" + messages.formatMessages());
|
||||
@@ -772,24 +792,31 @@ main.registerCommand({
|
||||
|
||||
process.stdout.write("Publishing package: " + name + "\n");
|
||||
|
||||
var pubEC; // XXX merge with messages?
|
||||
messages = buildmessage.capture({
|
||||
title: "publishing package " + name
|
||||
}, function () {
|
||||
var opts = {
|
||||
new: !catalog.official.getPackage(name)
|
||||
};
|
||||
// XXX merge with messages? having THREE kinds of error handling here is
|
||||
// um something.
|
||||
var pubEC;
|
||||
try {
|
||||
messages = buildmessage.capture({
|
||||
title: "publishing package " + name
|
||||
}, function () {
|
||||
var opts = {
|
||||
new: !catalog.official.getPackage(name)
|
||||
};
|
||||
|
||||
// If we are creating a new package, dsPS will document this for us, so
|
||||
// we don't need to do this here. Though, in the future, once we are
|
||||
// done bootstrapping package servers, we should consider having some
|
||||
// extra checks around this.
|
||||
pubEC = packageClient.publishPackage(
|
||||
prebuilt.source,
|
||||
prebuilt.compileResult,
|
||||
conn,
|
||||
opts);
|
||||
});
|
||||
// If we are creating a new package, dsPS will document this for us,
|
||||
// so we don't need to do this here. Though, in the future, once we
|
||||
// are done bootstrapping package servers, we should consider having
|
||||
// some extra checks around this.
|
||||
pubEC = packageClient.publishPackage(
|
||||
prebuilt.source,
|
||||
prebuilt.compileResult,
|
||||
conn,
|
||||
opts);
|
||||
});
|
||||
} catch (e) {
|
||||
packageClient.handlePackageServerConnectionError(e);
|
||||
return 1;
|
||||
}
|
||||
if (messages.hasMessages()) {
|
||||
process.stderr.write(messages.formatMessages());
|
||||
return pubEC || 1;
|
||||
@@ -813,8 +840,13 @@ main.registerCommand({
|
||||
// Create the new track, if we have been told to.
|
||||
if (options['create-track']) {
|
||||
process.stdout.write("Creating a new release track...\n");
|
||||
var track = conn.call('createReleaseTrack',
|
||||
{ name: relConf.track } );
|
||||
try {
|
||||
var track = conn.call('createReleaseTrack',
|
||||
{ name: relConf.track } );
|
||||
} catch (e) {
|
||||
packageClient.handlePackageServerConnectionError(e);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
process.stdout.write("Creating a new release version...\n");
|
||||
@@ -836,7 +868,7 @@ main.registerCommand({
|
||||
uploadInfo = conn.call('createPatchReleaseVersion', record, relConf.patchFrom);
|
||||
}
|
||||
} catch (err) {
|
||||
process.stderr.write("ERROR: " + err + "\n");
|
||||
packageClient.handlePackageServerConnectionError(err);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1265,7 +1297,7 @@ main.registerCommand({
|
||||
// and the user ran 'meteor update' without specifying a release? We
|
||||
// really can't do much here.
|
||||
if (!latestRelease) {
|
||||
// XXX is there a command to get to the latest METEOR-CORE@? Should we
|
||||
// XXX is there a command to get to the latest METEOR@? Should we
|
||||
// recommend it here?
|
||||
process.stderr.write(
|
||||
"There are no recommended releases on release track " +
|
||||
@@ -1884,10 +1916,18 @@ main.registerCommand({
|
||||
process.stdout.write(" Done!\n");
|
||||
}
|
||||
} catch (err) {
|
||||
process.stderr.write("\n" + err + "\n");
|
||||
packageClient.handlePackageServerConnectionError(err);
|
||||
return 1;
|
||||
}
|
||||
conn.close();
|
||||
|
||||
// Update the catalog so that we have this information, and find the record
|
||||
// again so that the message below is correct.
|
||||
refreshOfficialCatalogOrDie();
|
||||
doOrDie(function () {
|
||||
fullRecord = getReleaseOrPackageRecord(name);
|
||||
});
|
||||
record = fullRecord.record;
|
||||
}
|
||||
|
||||
process.stdout.write("\n The maintainers for " + name + " are:\n");
|
||||
@@ -2115,8 +2155,13 @@ main.registerCommand({
|
||||
return 1;
|
||||
}
|
||||
|
||||
conn.call('setBannersOnReleases', bannersData.track,
|
||||
bannersData.banners);
|
||||
try {
|
||||
conn.call('setBannersOnReleases', bannersData.track,
|
||||
bannersData.banners);
|
||||
} catch (e) {
|
||||
packageClient.handlePackageServerConnectionError(e);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Refresh afterwards.
|
||||
refreshOfficialCatalogOrDie();
|
||||
@@ -2172,7 +2217,8 @@ main.registerCommand({
|
||||
" is now a recommended release\n");
|
||||
}
|
||||
} catch (err) {
|
||||
process.stderr.write("\n" + err + "\n");
|
||||
packageClient.handlePackageServerConnectionError(err);
|
||||
return 1;
|
||||
}
|
||||
conn.close();
|
||||
refreshOfficialCatalogOrDie();
|
||||
@@ -2223,7 +2269,8 @@ main.registerCommand({
|
||||
conn.call('_setEarliestCompatibleVersion', versionInfo, ecv);
|
||||
process.stdout.write("Done!\n");
|
||||
} catch (err) {
|
||||
process.stderr.write("\n" + err + "\n");
|
||||
packageClient.handlePackageServerConnectionError(err);
|
||||
return 1;
|
||||
}
|
||||
conn.close();
|
||||
refreshOfficialCatalogOrDie();
|
||||
@@ -2266,7 +2313,8 @@ main.registerCommand({
|
||||
conn.call('_changePackageHomepage', name, url);
|
||||
process.stdout.write("Done!\n");
|
||||
} catch (err) {
|
||||
process.stderr.write("\n" + err + "\n");
|
||||
packageClient.handlePackageServerConnectionError(err);
|
||||
return 1;
|
||||
}
|
||||
conn.close();
|
||||
refreshOfficialCatalogOrDie();
|
||||
|
||||
@@ -386,7 +386,7 @@ Usage: meteor publish-release <path to json config> [--create-track]
|
||||
|
||||
Publishes a new release to the package server, as determined by the json
|
||||
configuration file, which must have the following keys:
|
||||
track: the release track to which you are publishing (ex: METEOR-CORE)
|
||||
track: the release track to which you are publishing (ex: METEOR)
|
||||
version: the version of this release
|
||||
recommended: is this a recommended release? (see below)
|
||||
description: a brief description of the release
|
||||
@@ -394,7 +394,7 @@ configuration file, which must have the following keys:
|
||||
tool: <package name>@<version> of the meteor tool that this release specifies
|
||||
packages: object of <package name> to <version> for specified package versions
|
||||
|
||||
Set the recommended flag to true for recommended releases (ex: METEOR-CORE@0.90)
|
||||
Set the recommended flag to true for recommended releases (ex: METEOR@0.90)
|
||||
and false for release candidates, experimental releases, etc. You must publish
|
||||
all package versions to the package server before you can specify them in a
|
||||
release.
|
||||
@@ -549,7 +549,7 @@ Options:
|
||||
|
||||
|
||||
>>> admin change-homepage
|
||||
Change the repository url of a package.
|
||||
Change the homepage url of a package.
|
||||
Usage: meteor admin change-homepage <package name> <new url>
|
||||
|
||||
Change the homepage containing package information.
|
||||
|
||||
@@ -205,7 +205,7 @@ exports.updateServerPackageData = function (cachedServerData, options) {
|
||||
useShortPages: options.useShortPages
|
||||
});
|
||||
} catch (err) {
|
||||
process.stderr.write("ERROR " + err.message + "\n");
|
||||
exports.handlePackageServerConnectionError(err);
|
||||
if (err.errorType === "DDP.ConnectionError") {
|
||||
cachedServerData = null;
|
||||
done = true;
|
||||
@@ -446,15 +446,10 @@ var createAndPublishBuiltPackage = function (conn, unipackage) {
|
||||
bundleResult.buildTarball);
|
||||
|
||||
process.stdout.write('Publishing package build...\n');
|
||||
try {
|
||||
conn.call('publishPackageBuild',
|
||||
uploadInfo.uploadToken,
|
||||
bundleResult.tarballHash,
|
||||
bundleResult.treeHash);
|
||||
} catch (err) {
|
||||
process.stderr.write("ERROR " + err.message + "\n");
|
||||
return;
|
||||
}
|
||||
conn.call('publishPackageBuild',
|
||||
uploadInfo.uploadToken,
|
||||
bundleResult.tarballHash,
|
||||
bundleResult.treeHash);
|
||||
|
||||
process.stdout.write('Published ' + unipackage.name +
|
||||
', version ' + unipackage.version);
|
||||
@@ -468,7 +463,7 @@ exports.handlePackageServerConnectionError = function (error) {
|
||||
if (error instanceof AlreadyPrintedMessageError) {
|
||||
// do nothing
|
||||
} else if (error.errorType === 'Meteor.Error') {
|
||||
process.stderr.write("Error connecting to package server");
|
||||
process.stderr.write("Error from package server");
|
||||
if (error.message) {
|
||||
process.stderr.write(": " + error.message);
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ _.extend(Project.prototype, {
|
||||
|
||||
if (!setV.success) {
|
||||
process.stdout.write(
|
||||
"Could not install all the requested packages. \n");
|
||||
"Could not install all the requested packages.\n");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ var Release = function (options) {
|
||||
var self = this;
|
||||
|
||||
// If an actual, proper, "released" release, the name of the
|
||||
// release, eg, "METEOR-CORE@1.0". If not a proper release, null.
|
||||
// release, eg, "METEOR@1.0". If not a proper release, null.
|
||||
self.name = options.name;
|
||||
|
||||
if (self.name === null) {
|
||||
|
||||
@@ -53,7 +53,7 @@ selftest.define("autoupdate", ['checkout'], function () {
|
||||
s.createApp('myapp', 'packageless');
|
||||
s.cd('myapp', function () {
|
||||
setBanner(s, "v2", "=> New hotness v2 being downloaded.\n");
|
||||
s.write('.meteor/release', 'METEOR-CORE@v2');
|
||||
s.write('.meteor/release', 'METEOR@v2');
|
||||
|
||||
// console.log("WE ARE READY NOW", s.warehouse, s.cwd)
|
||||
// require('../utils.js').sleepMs(1000*10000)
|
||||
@@ -76,7 +76,7 @@ selftest.define("autoupdate", ['checkout'], function () {
|
||||
|
||||
// If we are not at the latest version of Meteor, at startup, we get a
|
||||
// boring prompt to update (not a banner since we didn't set one for v1).
|
||||
s.write('.meteor/release', 'METEOR-CORE@v1');
|
||||
s.write('.meteor/release', 'METEOR@v1');
|
||||
|
||||
// We don't see any information if we run a simple command like list.
|
||||
run = s.run("list");
|
||||
@@ -98,7 +98,7 @@ selftest.define("autoupdate", ['checkout'], function () {
|
||||
run.stop();
|
||||
|
||||
// .. unless we explicitly forced this release. Then, no prompt.
|
||||
s.write('.meteor/release', 'METEOR-CORE@somethingelse');
|
||||
s.write('.meteor/release', 'METEOR@somethingelse');
|
||||
run = s.run("--release", "v1", "--port", "23000");
|
||||
run.waitSecs(5);
|
||||
run.match("running at");
|
||||
@@ -135,7 +135,7 @@ selftest.define("autoupdate", ['checkout'], function () {
|
||||
// and the downloading code turns out to be a noop if we already
|
||||
// have that version).
|
||||
recommend(s, "v3");
|
||||
s.write('.meteor/release', 'METEOR-CORE@v2');
|
||||
s.write('.meteor/release', 'METEOR@v2');
|
||||
run = s.run("--port", "26000");
|
||||
run.match("Meteor v3 is available");
|
||||
run.match("meteor update");
|
||||
|
||||
@@ -18,7 +18,7 @@ id-map@1.0.0
|
||||
insecure@1.0.0
|
||||
jquery@1.0.0
|
||||
json@1.0.0
|
||||
livedata@1.0.6
|
||||
livedata@1.0.7
|
||||
logging@1.0.2
|
||||
meteor@1.0.2
|
||||
minifiers@1.0.2
|
||||
|
||||
@@ -18,7 +18,7 @@ id-map@1.0.0
|
||||
insecure@1.0.0
|
||||
jquery@1.0.0
|
||||
json@1.0.0
|
||||
livedata@1.0.6
|
||||
livedata@1.0.7
|
||||
logging@1.0.2
|
||||
meteor@1.0.2
|
||||
minifiers@1.0.2
|
||||
|
||||
@@ -16,7 +16,7 @@ htmljs@1.0.0
|
||||
id-map@1.0.0
|
||||
jquery@1.0.0
|
||||
json@1.0.0
|
||||
livedata@1.0.6
|
||||
livedata@1.0.7
|
||||
logging@1.0.2
|
||||
meteor@1.0.2
|
||||
minifiers@1.0.2
|
||||
|
||||
@@ -426,7 +426,7 @@ var createAndPublishPackage = function (s, packageName) {
|
||||
s.cd("..");
|
||||
};
|
||||
|
||||
selftest.define("release track defaults to METEOR-CORE",
|
||||
selftest.define("release track defaults to METEOR",
|
||||
["net", "test-package-server", "checkout"], function () {
|
||||
var s = new Sandbox();
|
||||
s.set("METEOR_TEST_TMP", files.mkdtemp());
|
||||
@@ -438,7 +438,7 @@ selftest.define("release track defaults to METEOR-CORE",
|
||||
// Create a package that has a versionsFrom for the just-published
|
||||
// release, but without the release track present in the call to
|
||||
// `versionsFrom`. This implies that it should be prefixed
|
||||
// by "METEOR-CORE@"
|
||||
// by "METEOR@"
|
||||
var newPack = fullPackageName;
|
||||
s.createPackage(newPack, "package-of-two-versions");
|
||||
s.cd(newPack, function() {
|
||||
@@ -450,12 +450,12 @@ selftest.define("release track defaults to METEOR-CORE",
|
||||
});
|
||||
|
||||
// Try to publish the package. The error message should demonstrate
|
||||
// that we indeed default to the METEOR-CORE release track when not
|
||||
// that we indeed default to the METEOR release track when not
|
||||
// specified.
|
||||
s.cd(newPack, function() {
|
||||
var run = s.run("publish", "--create");
|
||||
run.waitSecs(20);
|
||||
run.matchErr("Unknown release METEOR-CORE@" + releaseVersion);
|
||||
run.matchErr("Unknown release METEOR@" + releaseVersion);
|
||||
run.expectExit(1);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ Package.describe({
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
// api.versionsFrom('METEOR-CORE@0.9.0-rc9');
|
||||
// api.versionsFrom('METEOR@0.9.0-rc9');
|
||||
api.addFiles('fake-accounts-base.js');
|
||||
});
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@ selftest.define("springboard", ['checkout', 'net'], function () {
|
||||
|
||||
// If run not in an app dir, runs the latest version ...
|
||||
run = s.run("--long-version");
|
||||
run.read('METEOR-CORE@v2\n' + toolsVersion + '\n');
|
||||
run.read('METEOR@v2\n' + toolsVersion + '\n');
|
||||
run.expectEnd();
|
||||
run.expectExit(0);
|
||||
|
||||
// ... unless you asked for a different one.
|
||||
run = s.run("--long-version", "--release", "METEOR-CORE@v1");
|
||||
run.read('METEOR-CORE@v1\n' + toolsVersion + '\n');
|
||||
run = s.run("--long-version", "--release", "METEOR@v1");
|
||||
run.read('METEOR@v1\n' + toolsVersion + '\n');
|
||||
run.expectEnd();
|
||||
run.expectExit(0);
|
||||
|
||||
@@ -44,15 +44,15 @@ selftest.define("springboard", ['checkout', 'net'], function () {
|
||||
run.expectExit(0);
|
||||
s.cd('myapp', function () {
|
||||
run = s.run("--long-version");
|
||||
run.read('METEOR-CORE@v2\n' + toolsVersion + '\n');
|
||||
run.read('METEOR@v2\n' + toolsVersion + '\n');
|
||||
run.expectExit(0);
|
||||
});
|
||||
|
||||
// ... unless you asked for a different one.
|
||||
run = s.run("create", "myapp2", "--release", "METEOR-CORE@v1").expectExit(0);
|
||||
run = s.run("create", "myapp2", "--release", "METEOR@v1").expectExit(0);
|
||||
s.cd('myapp2', function () {
|
||||
run = s.run("--long-version");
|
||||
run.read('METEOR-CORE@v1\n' + toolsVersion + '\n');
|
||||
run.read('METEOR@v1\n' + toolsVersion + '\n');
|
||||
run.expectExit(0);
|
||||
});
|
||||
|
||||
@@ -148,7 +148,7 @@ selftest.define("writing versions file", ['checkout', 'net'], function () {
|
||||
run.expectExit(0);
|
||||
s.cd('myapp');
|
||||
run = s.run("--long-version");
|
||||
run.read('METEOR-CORE@v2\n' + toolsVersion + '\n');
|
||||
run.read('METEOR@v2\n' + toolsVersion + '\n');
|
||||
run.expectExit(0);
|
||||
|
||||
// Check the contents of the versions file.
|
||||
|
||||
@@ -55,7 +55,7 @@ selftest.define("report-stats", ["slow", "net"], function () {
|
||||
s.createApp("foo", "package-stats-tests");
|
||||
s.cd("foo");
|
||||
if (useFakeRelease) {
|
||||
s.write('.meteor/release', 'METEOR-CORE@v1');
|
||||
s.write('.meteor/release', 'METEOR@v1');
|
||||
}
|
||||
|
||||
var sandboxProject = new project.Project();
|
||||
@@ -64,7 +64,7 @@ selftest.define("report-stats", ["slow", "net"], function () {
|
||||
// XXX Copied from http-helpers.js
|
||||
var version;
|
||||
if (useFakeRelease) {
|
||||
version = "METEOR-CORE@v1";
|
||||
version = "METEOR@v1";
|
||||
} else {
|
||||
version = release.current.isCheckout() ? "checkout" : release.current.name;
|
||||
}
|
||||
|
||||
@@ -245,22 +245,22 @@ selftest.define("update during run", ["checkout"], function () {
|
||||
s.set("NO_METEOR_PACKAGE", "t");
|
||||
|
||||
// If the app version changes, we exit with an error message.
|
||||
s.write('.meteor/release', 'METEOR-CORE@v1');
|
||||
s.write('.meteor/release', 'METEOR@v1');
|
||||
run = s.run();
|
||||
run.tellMongo(MONGO_LISTENING);
|
||||
run.waitSecs(2);
|
||||
run.match('localhost:3000');
|
||||
s.write('.meteor/release', 'METEOR-CORE@v2');
|
||||
run.matchErr('to Meteor METEOR-CORE@v2 from Meteor METEOR-CORE@v1');
|
||||
s.write('.meteor/release', 'METEOR@v2');
|
||||
run.matchErr('to Meteor METEOR@v2 from Meteor METEOR@v1');
|
||||
run.expectExit(254);
|
||||
|
||||
// But not if the release was forced (case 1)
|
||||
s.write('.meteor/release', 'METEOR-CORE@v1');
|
||||
run = s.run("--release", "METEOR-CORE@v3");
|
||||
s.write('.meteor/release', 'METEOR@v1');
|
||||
run = s.run("--release", "METEOR@v3");
|
||||
run.tellMongo(MONGO_LISTENING);
|
||||
run.waitSecs(2);
|
||||
run.match('localhost:3000');
|
||||
s.write('.meteor/release', 'METEOR-CORE@v2');
|
||||
s.write('.meteor/release', 'METEOR@v2');
|
||||
s.write('empty.js', '');
|
||||
run.waitSecs(2);
|
||||
run.match('restarted');
|
||||
@@ -268,12 +268,12 @@ selftest.define("update during run", ["checkout"], function () {
|
||||
run.forbidAll("updated");
|
||||
|
||||
// But not if the release was forced (case 2)
|
||||
s.write('.meteor/release', 'METEOR-CORE@v1');
|
||||
run = s.run("--release", "METEOR-CORE@v1");
|
||||
s.write('.meteor/release', 'METEOR@v1');
|
||||
run = s.run("--release", "METEOR@v1");
|
||||
run.tellMongo(MONGO_LISTENING);
|
||||
run.waitSecs(2);
|
||||
run.match('localhost:3000');
|
||||
s.write('.meteor/release', 'METEOR-CORE@v2');
|
||||
s.write('.meteor/release', 'METEOR@v2');
|
||||
s.write('empty.js', '');
|
||||
run.waitSecs(2);
|
||||
run.match('restarted');
|
||||
@@ -285,12 +285,12 @@ selftest.define("update during run", ["checkout"], function () {
|
||||
s.createApp("myapp", "standard-app");
|
||||
s.cd("myapp");
|
||||
|
||||
s.write('.meteor/release', 'METEOR-CORE@v1');
|
||||
s.write('.meteor/release', 'METEOR@v1');
|
||||
run = s.run();
|
||||
run.tellMongo(MONGO_LISTENING);
|
||||
run.waitSecs(2);
|
||||
run.match('localhost:3000');
|
||||
s.write('.meteor/release', 'METEOR-CORE@v2');
|
||||
s.write('.meteor/release', 'METEOR@v2');
|
||||
s.write('empty.js', '');
|
||||
run.waitSecs(2);
|
||||
run.match('restarted');
|
||||
|
||||
@@ -213,8 +213,10 @@ _.extend(exports.Tropohouse.prototype, {
|
||||
var buildsToDownload = catalog.official.getBuildsForArches(
|
||||
packageName, version, archesToDownload);
|
||||
if (! buildsToDownload) {
|
||||
throw new Error(
|
||||
var e = new Error(
|
||||
"No compatible build found for " + packageName + "@" + version);
|
||||
e.noCompatibleBuildError = true;
|
||||
throw e;
|
||||
}
|
||||
|
||||
// XXX replace with a real progress bar in downloadMissingPackages
|
||||
@@ -273,6 +275,10 @@ _.extend(exports.Tropohouse.prototype, {
|
||||
// that will run on this system (or the requested architecture). Return the
|
||||
// object with mapping packageName to version for the packages that we have
|
||||
// successfully downloaded.
|
||||
//
|
||||
// XXX This function's error handling capabilities are poor. It's supposed to
|
||||
// return a data structure that its callers check, but most of its callers
|
||||
// don't check it. Bleah. Should rewrite this and all of its callers.
|
||||
downloadMissingPackages: function (versionMap, options) {
|
||||
var self = this;
|
||||
buildmessage.assertInCapture();
|
||||
@@ -288,11 +294,12 @@ _.extend(exports.Tropohouse.prototype, {
|
||||
});
|
||||
downloadedPackages[name] = version;
|
||||
} catch (err) {
|
||||
// We have failed to download the right things and put them on disk!
|
||||
// This should not happen, and we aren't sure why it happened.
|
||||
// XXX plenty of reasons why this might happen! eg, no network.
|
||||
// better error handling here!
|
||||
console.log(err);
|
||||
if (!(err.noCompatibleBuildError))
|
||||
throw err;
|
||||
console.log(err.message);
|
||||
// continue, which is weird, but we want to avoid a stack trace...
|
||||
// the caller is supposed to check the size of the return value,
|
||||
// although many callers do not.
|
||||
}
|
||||
});
|
||||
return downloadedPackages;
|
||||
|
||||
@@ -131,7 +131,7 @@ var maybeShowBanners = function () {
|
||||
var updateMeteorToolSymlink = function () {
|
||||
buildmessage.assertInCapture();
|
||||
|
||||
// Get the latest release version of METEOR-CORE. (*Always* of the default
|
||||
// Get the latest release version of METEOR. (*Always* of the default
|
||||
// track, not of whatever we happen to be running: we always want the tool
|
||||
// symlink to go to the default track.)
|
||||
var latestReleaseVersion = catalog.official.getDefaultReleaseVersion();
|
||||
|
||||
Reference in New Issue
Block a user