Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

"tools" -> "scripts", "engine" -> "tools"

  • Loading branch information...
commit 8a79edb43b2ba66a4f8e2764afcf5347ffdf092b 1 parent fa0c307
@glasser glasser authored
Showing with 157 additions and 158 deletions.
  1. +1 −1  .gitmodules
  2. +2 −2 meteor
  3. 0  {tools → scripts}/admin/bless-release.sh
  4. +4 −4 {tools → scripts}/admin/build-fake-release.sh
  5. 0  {tools → scripts}/admin/build-install-script.js
  6. +1 −1  {tools → scripts}/admin/build-package-tarballs.sh
  7. +5 −5 {tools → scripts}/admin/build-release.sh
  8. +40 −0 scripts/admin/build-tools-tarballs.sh
  9. +12 −12 tools/admin/build-engine-tree.sh → scripts/admin/build-tools-tree.sh
  10. 0  {tools → scripts}/admin/changelog.json
  11. 0  {tools → scripts}/admin/debian/changelog
  12. 0  {tools → scripts}/admin/debian/compat
  13. 0  {tools → scripts}/admin/debian/control
  14. 0  {tools → scripts}/admin/debian/copyright
  15. 0  {tools → scripts}/admin/debian/docs
  16. 0  {tools → scripts}/admin/debian/meteor.install
  17. 0  {tools → scripts}/admin/debian/rules
  18. 0  {tools → scripts}/admin/debian/source/format
  19. 0  {tools → scripts}/admin/deploy-examples.sh
  20. 0  {tools → scripts}/admin/find-new-npm-versions.sh
  21. +1 −1  {tools → scripts}/admin/initial-engine-post-upgrade.js
  22. +1 −0  scripts/admin/install-bootstrap.txt
  23. 0  {tools → scripts}/admin/install-template.sh
  24. 0  {tools → scripts}/admin/manifest.json
  25. +3 −3 {tools → scripts}/admin/meteor-bootstrap.sh
  26. 0  {tools → scripts}/admin/meteor.spec
  27. 0  {tools → scripts}/admin/publish-release.sh
  28. 0  {tools → scripts}/admin/publish-release/.meteor/.gitignore
  29. 0  {tools → scripts}/admin/publish-release/.meteor/packages
  30. 0  {tools → scripts}/admin/publish-release/packages/awssum
  31. +10 −10 {tools → scripts}/admin/publish-release/server/publish-release.js
  32. 0  {tools → scripts}/admin/spark-standalone.sh
  33. +1 −1  {tools → scripts}/bundler-test.sh
  34. +2 −2 {tools → scripts}/cli-test.sh
  35. 0  {tools → scripts}/copy-release-from-jenkins.sh
  36. 0  {tools → scripts}/generate-dev-bundle.sh
  37. 0  {tools → scripts}/node.sh
  38. +4 −4 tools/run-engine-tests.sh → scripts/run-tools-tests.sh
  39. +0 −40 tools/admin/build-engine-tarballs.sh
  40. +0 −1  tools/admin/install-bootstrap.txt
  41. 0  {engine → tools}/app.html.in
  42. +2 −2 {engine → tools}/bundler.js
  43. 0  {engine → tools}/cleanup.js
  44. 0  {engine → tools}/deploy.js
  45. 0  {engine → tools}/fiber-helpers.js
  46. +8 −8 {engine → tools}/files.js
  47. +21 −21 {engine → tools}/meteor.js
  48. 0  {engine → tools}/meteor_npm.js
  49. 0  {engine → tools}/mongo_exit_codes.js
  50. 0  {engine → tools}/mongo_runner.js
  51. +1 −1  {engine → tools}/packages.js
  52. +1 −2  {engine → tools}/project.js
  53. +1 −1  {engine → tools}/run.js
  54. +1 −1  {engine → tools}/server/server.js
  55. 0  {engine/tests/empty-app → tools/skel}/.meteor/.gitignore
  56. 0  {engine → tools}/skel/.meteor/packages
  57. 0  {engine → tools}/skel/~name~.css
  58. 0  {engine → tools}/skel/~name~.html
  59. 0  {engine → tools}/skel/~name~.js
  60. 0  {engine/tests/app-with-package → tools/test-runner-app}/.meteor/.gitignore
  61. 0  {engine → tools}/test-runner-app/.meteor/packages
  62. 0  {engine/test-runner-app → tools/tests/app-with-package}/.meteor/.gitignore
  63. 0  {engine → tools}/tests/app-with-package/.meteor/packages
  64. 0  {engine/skel → tools/tests/empty-app}/.meteor/.gitignore
  65. 0  {engine → tools}/tests/empty-app/.meteor/packages
  66. 0  {engine → tools}/tests/test_bundler.js
  67. +1 −1  {engine → tools}/tests/test_bundler_npm.js
  68. 0  {engine → tools}/tests/test_bundler_options.js
  69. 0  {engine → tools}/updater.js
  70. +34 −34 {engine → tools}/warehouse.js
View
2  .gitmodules
@@ -1,3 +1,3 @@
[submodule "meteor-awssum"]
- path = tools/admin/publish-release/packages/awssum
+ path = scripts/admin/publish-release/packages/awssum
url = https://github.com/avital/meteor-awssum
View
4 meteor
@@ -83,11 +83,11 @@ if [ -d "$SCRIPT_DIR/.git" ] || [ -f "$SCRIPT_DIR/.git" ]; then
fi
DEV_BUNDLE="$SCRIPT_DIR/dev_bundle"
- METEOR="$SCRIPT_DIR/engine/meteor.js"
+ METEOR="$SCRIPT_DIR/tools/meteor.js"
else
# In an install
DEV_BUNDLE=$(dirname "$SCRIPT_DIR")
- METEOR="$DEV_BUNDLE/engine/meteor.js"
+ METEOR="$DEV_BUNDLE/tools/meteor.js"
fi
View
0  tools/admin/bless-release.sh → scripts/admin/bless-release.sh
File renamed without changes
View
8 tools/admin/build-fake-release.sh → scripts/admin/build-fake-release.sh
@@ -44,12 +44,12 @@ popd
# Copy post-upgrade script to where it is expected.
mkdir -p "$FAKE_TMPDIR/meteor/app/meteor"
-cp "$TOPDIR/tools/admin/initial-engine-post-upgrade.js" \
+cp "$TOPDIR/scripts/admin/initial-engine-post-upgrade.js" \
"$FAKE_TMPDIR/meteor/app/meteor/post-upgrade.js"
# Copy in meteor-bootstrap.sh, which will become the installed
# /usr/local/bin/meteor.
-cp "$TOPDIR/tools/admin/meteor-bootstrap.sh" \
+cp "$TOPDIR/scripts/admin/meteor-bootstrap.sh" \
"$FAKE_TMPDIR/meteor/app/meteor/meteor-bootstrap.sh"
OUTDIR="$TOPDIR/dist"
@@ -69,7 +69,7 @@ if [ "$UNAME" == "Linux" ] ; then
cp "$TARBALL" "meteor_${VERSION}.orig.tar.gz"
mkdir "meteor-${VERSION}"
cd "meteor-${VERSION}"
- cp -r "$TOPDIR/tools/admin/debian" .
+ cp -r "$TOPDIR/scripts/admin/debian" .
export TARBALL
dpkg-buildpackage
cp ../*.deb "$OUTDIR"
@@ -79,6 +79,6 @@ if [ "$UNAME" == "Linux" ] ; then
RPMDIR="$FAKE_TMPDIR/rpm"
mkdir $RPMDIR
rpmbuild -bb --define="TARBALL $TARBALL" \
- --define="_topdir $RPMDIR" "$TOPDIR/tools/admin/meteor.spec"
+ --define="_topdir $RPMDIR" "$TOPDIR/scripts/admin/meteor.spec"
cp $RPMDIR/RPMS/*/*.rpm "$OUTDIR"
fi
View
0  tools/admin/build-install-script.js → scripts/admin/build-install-script.js
File renamed without changes
View
2  tools/admin/build-package-tarballs.sh → scripts/admin/build-package-tarballs.sh
@@ -8,7 +8,7 @@
### At the moment smart packages don't support binary dependencies so
### we don't have to build on different architectures. At some point
### this will change, at which we'll use an approach similar to what
-### we do for engines.
+### we do for tools.
set -e
View
10 tools/admin/build-release.sh → scripts/admin/build-release.sh
@@ -11,18 +11,18 @@ OUTDIR="$TOPDIR/dist"
rm -rf "$OUTDIR"
mkdir -p "$OUTDIR"
-tools/admin/build-engine-tarballs.sh
-ENGINE_VERSION=$(cat "$TOPDIR/.engine_version")
-tools/admin/build-package-tarballs.sh
+scripts/admin/build-tools-tarballs.sh
+TOOLS_VERSION=$(cat "$TOPDIR/.tools_version")
+scripts/admin/build-package-tarballs.sh
MANIFEST_PACKAGE_CHUNK=$(cat "$TOPDIR/.package_manifest_chunk")
# don't keep these around since they get outdated
-rm "$TOPDIR/.engine_version"
+rm "$TOPDIR/.tools_version"
rm "$TOPDIR/.package_manifest_chunk"
cat > "$OUTDIR/manifest.json" <<ENDOFMANIFEST
{
- "engine": "$ENGINE_VERSION",
+ "tools": "$TOOLS_VERSION",
"packages": {
$MANIFEST_PACKAGE_CHUNK
}
View
40 scripts/admin/build-tools-tarballs.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+set -e
+
+# cd to top level dir
+cd `dirname $0`
+cd ../..
+TOPDIR=$(pwd)
+
+UNAME=$(uname)
+ARCH=$(uname -m)
+
+TOOLS_TMPDIR=$(mktemp -d -t meteor-build-release-XXXXXXXX)
+trap 'rm -rf "$TOOLS_TMPDIR" >/dev/null 2>&1' 0
+
+# build the tools in a temporary directory. after its built we know
+# its version so rename the directory.
+mkdir -p "$TOOLS_TMPDIR/.meteor/tools"
+export TARGET_DIR="$TOOLS_TMPDIR/.meteor/tools/new"
+$TOPDIR/scripts/admin/build-tools-tree.sh
+TOOLS_VERSION=$(cat $TARGET_DIR/.tools_version.txt)
+mv "$TARGET_DIR" "$TOOLS_TMPDIR/.meteor/tools/$TOOLS_VERSION"
+
+ln -s "$TOOLS_VERSION" "$TOOLS_TMPDIR/.meteor/tools/latest"
+ln -s tools/latest/bin/meteor "$TOOLS_TMPDIR/.meteor/meteor"
+
+# tar it up
+OUTDIR="$TOPDIR/dist/tools"
+mkdir -p "$OUTDIR"
+
+TOOLS_TARBALL="$OUTDIR/meteor-tools-${TOOLS_VERSION}-${UNAME}-${ARCH}.tar.gz"
+echo "Tarring tools to: $TOOLS_TARBALL"
+tar -C "$TOOLS_TMPDIR/.meteor/tools" --exclude .meteor/local -czf "$TOOLS_TARBALL" "$TOOLS_VERSION"
+
+TOOLS_BOOTSTRAP_TARBALL="$OUTDIR/meteor-tools-bootstrap-${UNAME}-${ARCH}.tar.gz"
+echo "Tarring tools bootstrap to: $TOOLS_BOOTSTRAP_TARBALL"
+tar -C "$TOOLS_TMPDIR" --exclude .meteor/local -czf "$TOOLS_BOOTSTRAP_TARBALL" .meteor
+
+# A hacky (?) way to pass $TOOLS_VERSION back into build-release.sh
+echo $TOOLS_VERSION > $TOPDIR/.tools_version
View
24 tools/admin/build-engine-tree.sh → scripts/admin/build-tools-tree.sh
@@ -1,9 +1,9 @@
#!/bin/bash
# This script fills TARGET_DIR with what should go into
-# /usr/local/meteor/engines/X.Y.Z
+# ~/.meteor/tools/VERSION
# It does not set up the top-level springboard file in
-# /usr/local/meteor/engines or the /usr/local/bin/meteor symlink.
+# ~/.meteor/tools or the ~/.meteor/meteor symlink.
cd `dirname $0`/../..
@@ -19,7 +19,7 @@ if [ -e "$TARGET_DIR" ] ; then
exit 1
fi
-echo "Setting up engine tree in $TARGET_DIR"
+echo "Setting up tools tree in $TARGET_DIR"
# make sure dev bundle exists before trying to install
./meteor --version || exit 1
@@ -28,28 +28,28 @@ function CPR {
tar -c --exclude .meteor/local "$1" | tar -x -C "$2"
}
-# The engine starts as a copy of the dev bundle.
+# The tools starts as a copy of the dev bundle.
cp -a dev_bundle "$TARGET_DIR"
# Copy over files and directories that we want in the tarball. Keep this list
-# synchronized with the files used in the $ENGINE_VERSION calculation below. The
+# synchronized with the files used in the $TOOLS_VERSION calculation below. The
# "meteor" script file contains the version number of the dev bundle, so we
# include that instead of the (arch-specific) bundle itself in sha calculation.
cp LICENSE.txt "$TARGET_DIR"
cp meteor "$TARGET_DIR/bin"
-CPR engine "$TARGET_DIR"
+CPR tools "$TARGET_DIR"
CPR examples "$TARGET_DIR"
# Trim tests and unfinished examples.
-rm -rf "$TARGET_DIR"/engine/tests
+rm -rf "$TARGET_DIR"/tools/tests
rm -rf "$TARGET_DIR"/examples/unfinished
rm -rf "$TARGET_DIR"/examples/other
# mark directory with current git sha
git rev-parse HEAD > "$TARGET_DIR/.git_version.txt"
-# generate engine version: directory hash that depends only on file
+# generate tools version: directory hash that depends only on file
# contents but nothing else, eg modification time
-echo -n "Computing engine version... "
-ENGINE_VERSION=$(git ls-tree HEAD LICENSE.txt meteor engine examples | shasum | cut -f 1 -d " ") # shasum's output looks like: 'SHA -'
-echo $ENGINE_VERSION
-echo -n "$ENGINE_VERSION" > "$TARGET_DIR/.engine_version.txt"
+echo -n "Computing tools version... "
+TOOLS_VERSION=$(git ls-tree HEAD LICENSE.txt meteor tools examples | shasum | cut -f 1 -d " ") # shasum's output looks like: 'SHA -'
+echo $TOOLS_VERSION
+echo -n "$TOOLS_VERSION" > "$TARGET_DIR/.tools_version.txt"
View
0  tools/admin/changelog.json → scripts/admin/changelog.json
File renamed without changes
View
0  tools/admin/debian/changelog → scripts/admin/debian/changelog
File renamed without changes
View
0  tools/admin/debian/compat → scripts/admin/debian/compat
File renamed without changes
View
0  tools/admin/debian/control → scripts/admin/debian/control
File renamed without changes
View
0  tools/admin/debian/copyright → scripts/admin/debian/copyright
File renamed without changes
View
0  tools/admin/debian/docs → scripts/admin/debian/docs
File renamed without changes
View
0  tools/admin/debian/meteor.install → scripts/admin/debian/meteor.install
File renamed without changes
View
0  tools/admin/debian/rules → scripts/admin/debian/rules
File renamed without changes
View
0  tools/admin/debian/source/format → scripts/admin/debian/source/format
File renamed without changes
View
0  tools/admin/deploy-examples.sh → scripts/admin/deploy-examples.sh
File renamed without changes
View
0  tools/admin/find-new-npm-versions.sh → scripts/admin/find-new-npm-versions.sh
File renamed without changes
View
2  tools/admin/initial-engine-post-upgrade.js → scripts/admin/initial-engine-post-upgrade.js
@@ -107,7 +107,7 @@ var rpmUpgrade = function () {
};
Fiber(function () {
- console.log("Upgrading to Engine Meteor in " + prefix + "!");
+ console.log("Upgrading to Tools Meteor in " + prefix + "!");
if (package_stamp === 'tar') {
macUpgrade();
} else if (package_stamp === 'deb') {
View
1  scripts/admin/install-bootstrap.txt
@@ -0,0 +1 @@
+https://warehouse.meteor.com/tools/c3cdeb9f118c5241ca6a4f1d5b88aa04f0c08ab7
View
0  tools/admin/install-template.sh → scripts/admin/install-template.sh
File renamed without changes
View
0  tools/admin/manifest.json → scripts/admin/manifest.json
File renamed without changes
View
6 tools/admin/meteor-bootstrap.sh → scripts/admin/meteor-bootstrap.sh
@@ -39,14 +39,14 @@ if [ ! -x "$HOME/.meteor/meteor" ]; then
fi
fi
- # This returns something like https://warehouse.meteor.com/engines/db68972b9d239a95bffa3abe652d1e17815dba91
+ # This returns something like https://warehouse.meteor.com/tools/db68972b9d239a95bffa3abe652d1e17815dba91
ROOT_URL="$(curl -s --fail $BOOTSTRAP_URL)"
- TARBALL_URL="${ROOT_URL}/meteor-engine-bootstrap-${UNAME}-${ARCH}.tar.gz"
+ TARBALL_URL="${ROOT_URL}/meteor-tools-bootstrap-${UNAME}-${ARCH}.tar.gz"
INSTALL_TMPDIR="$HOME/.meteor-install-tmp"
rm -rf "$INSTALL_TMPDIR"
mkdir "$INSTALL_TMPDIR"
- echo 'This is your first time using Meteor! Downloading the engine now.'
+ echo 'This is your first time using Meteor! Downloading the tools now.'
curl --progress-bar --fail "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR"
# bomb out if it didn't work, eg no net
test -x "${INSTALL_TMPDIR}/.meteor/meteor"
View
0  tools/admin/meteor.spec → scripts/admin/meteor.spec
File renamed without changes
View
0  tools/admin/publish-release.sh → scripts/admin/publish-release.sh
File renamed without changes
View
0  .../admin/publish-release/.meteor/.gitignore → .../admin/publish-release/.meteor/.gitignore
File renamed without changes
View
0  tools/admin/publish-release/.meteor/packages → ...ts/admin/publish-release/.meteor/packages
File renamed without changes
View
0  tools/admin/publish-release/packages/awssum → ...pts/admin/publish-release/packages/awssum
File renamed without changes
View
20 ...publish-release/server/publish-release.js → ...publish-release/server/publish-release.js
@@ -71,27 +71,27 @@ var noneWithPrefix = function(s3, prefix) {
return !_.isEmpty(files.Body.ListBucketResult.Contents);
};
-// publish a given engine, copying multiple files from
+// publish a given tools, copying multiple files from
// s3://com.meteor.warehouse/RELEASE/unpublished/ to
-// s3://com.meteor.warehouse/engines/VERSION/
-var publishEngine = function(s3, release, version) {
- var destPath = ["engines", version].join("/");
+// s3://com.meteor.warehouse/tools/VERSION/
+var publishTools = function(s3, release, version) {
+ var destPath = ["tools", version].join("/");
- process.stdout.write("engine " + version + ": ");
+ process.stdout.write("tools " + version + ": ");
if (noneWithPrefix(s3, destPath)) {
console.log("already published");
return;
} else {
- publishedArtifacts.push("engine " + version);
+ publishedArtifacts.push("tools " + version);
console.log("publishing");
}
- var engineArtifacts = s3.ListObjects({
+ var toolsArtifacts = s3.ListObjects({
BucketName: "com.meteor.warehouse",
- Prefix: ["unpublished", release, "meteor-engine-"].join("/")
+ Prefix: ["unpublished", release, "meteor-tools-"].join("/")
}).Body.ListBucketResult.Contents;
- parallelEach(engineArtifacts, function (artifact) {
+ parallelEach(toolsArtifacts, function (artifact) {
var sourceKey = artifact.Key;
var filename = _.last(sourceKey.split("/"));
var destKey = [destPath, filename].join("/");
@@ -178,7 +178,7 @@ var main = function() {
var release = getGitSha();
var s3 = configureS3();
var manifest = getManifest(s3, release);
- publishEngine(s3, release, manifest.engine);
+ publishTools(s3, release, manifest.tools);
parallelEach(manifest.packages, function(version, name) {
publishPackage(s3, release, name, version);
});
View
0  tools/admin/spark-standalone.sh → scripts/admin/spark-standalone.sh
File renamed without changes
View
2  tools/bundler-test.sh → scripts/bundler-test.sh
@@ -7,7 +7,7 @@ trap 'echo FAILED' EXIT
METEOR_DIR=$(pwd)/..
# run tests
-./node.sh $METEOR_DIR/engine/tests/test_bundler.js
+./node.sh $METEOR_DIR/tools/tests/test_bundler.js
# cleanup trap, and print "SUCCESS"
trap - EXIT
View
4 tools/cli-test.sh → scripts/cli-test.sh
@@ -23,11 +23,11 @@ if [ "$1" == "--global" ]; then
fi
if [ "$TEST_WAREHOUSE_DIR" ]; then
- # The point of this testing script is to test the engine, so we make
+ # The point of this testing script is to test the tools, so we make
# sure (in lib/meteor.js) to not springboard if TEST_WAREHOUSE_DIR is
# set. This is a random release that we pass to --release on all
# commands (in case TEST_WAREHOUSE_DIR) is set. This could break if
- # this specified release is incompatible with the current engine, in
+ # this specified release is incompatible with the current tools, in
# which case you can build and publish a new release and set it here.
TEST_RELEASE="0.6.0"
View
0  tools/copy-release-from-jenkins.sh → scripts/copy-release-from-jenkins.sh
File renamed without changes
View
0  tools/generate-dev-bundle.sh → scripts/generate-dev-bundle.sh
File renamed without changes
View
0  tools/node.sh → scripts/node.sh
File renamed without changes
View
8 tools/run-engine-tests.sh → scripts/run-tools-tests.sh
@@ -12,14 +12,14 @@ make_temp_dir() {
mktemp -d -t $1.XXXXXX
}
-## Test the Meteor CLI from an installed engine (tests loading packages
+## Test the Meteor CLI from an installed tools (tests loading packages
## into the warehouse). Notably
TEST_TMPDIR=$(make_temp_dir meteor-installed-cli-tests)
-ENGINE_DIR="$TEST_TMPDIR/engine-tree"
-TARGET_DIR="$ENGINE_DIR" admin/build-engine-tree.sh
+TOOLS_DIR="$TEST_TMPDIR/tools-tree"
+TARGET_DIR="$TOOLS_DIR" admin/build-tools-tree.sh
export TEST_WAREHOUSE_DIR=$(make_temp_dir meteor-installed-cli-tests-warehouse) # run with empty warehouse
-export METEOR_DIR="$ENGINE_DIR/bin"
+export METEOR_DIR="$TOOLS_DIR/bin"
./cli-test.sh
unset TEST_WAREHOUSE_DIR
unset METEOR_DIR
View
40 tools/admin/build-engine-tarballs.sh
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# cd to top level dir
-cd `dirname $0`
-cd ../..
-TOPDIR=$(pwd)
-
-UNAME=$(uname)
-ARCH=$(uname -m)
-
-ENGINE_TMPDIR=$(mktemp -d -t meteor-build-release-XXXXXXXX)
-trap 'rm -rf "$ENGINE_TMPDIR" >/dev/null 2>&1' 0
-
-# build the engine in a temporary directory. after its built we know
-# its version so rename the directory.
-mkdir -p "$ENGINE_TMPDIR/.meteor/engines"
-export TARGET_DIR="$ENGINE_TMPDIR/.meteor/engines/new"
-$TOPDIR/tools/admin/build-engine-tree.sh
-ENGINE_VERSION=$(cat $TARGET_DIR/.engine_version.txt)
-mv "$TARGET_DIR" "$ENGINE_TMPDIR/.meteor/engines/$ENGINE_VERSION"
-
-ln -s "$ENGINE_VERSION" "$ENGINE_TMPDIR/.meteor/engines/latest"
-ln -s engines/latest/bin/meteor "$ENGINE_TMPDIR/.meteor/meteor"
-
-# tar it up
-OUTDIR="$TOPDIR/dist/engine"
-mkdir -p "$OUTDIR"
-
-ENGINE_TARBALL="$OUTDIR/meteor-engine-${ENGINE_VERSION}-${UNAME}-${ARCH}.tar.gz"
-echo "Tarring engine to: $ENGINE_TARBALL"
-tar -C "$ENGINE_TMPDIR/.meteor/engines" --exclude .meteor/local -czf "$ENGINE_TARBALL" "$ENGINE_VERSION"
-
-ENGINE_BOOTSTRAP_TARBALL="$OUTDIR/meteor-engine-bootstrap-${UNAME}-${ARCH}.tar.gz"
-echo "Tarring engine bootstrap to: $ENGINE_BOOTSTRAP_TARBALL"
-tar -C "$ENGINE_TMPDIR" --exclude .meteor/local -czf "$ENGINE_BOOTSTRAP_TARBALL" .meteor
-
-# A hacky (?) way to pass $ENGINE_VERSION back into build-release.sh
-echo $ENGINE_VERSION > $TOPDIR/.engine_version
View
1  tools/admin/install-bootstrap.txt
@@ -1 +0,0 @@
-https://warehouse.meteor.com/engines/c3cdeb9f118c5241ca6a4f1d5b88aa04f0c08ab7
View
0  engine/app.html.in → tools/app.html.in
File renamed without changes
View
4 engine/bundler.js → tools/bundler.js
@@ -3,7 +3,7 @@
// /static [served by node for now]
// /static_cacheable [cache-forever files, served by node for now]
// /server [XXX split out into a package]
-// server.js, .... [contents of engine/server]
+// server.js, .... [contents of tools/server]
// node_modules [for now, contents of (dev_bundle)/lib/node_modules]
// /app.html
// /app [user code]
@@ -702,7 +702,7 @@ _.extend(Bundle.prototype, {
where: 'internal',
hash: self._hash(app_html)
});
- dependencies_json.core.push(path.join('engine', 'app.html.in'));
+ dependencies_json.core.push(path.join('tools', 'app.html.in'));
// --- Documentation, and running from the command line ---
View
0  engine/cleanup.js → tools/cleanup.js
File renamed without changes
View
0  engine/deploy.js → tools/deploy.js
File renamed without changes
View
0  engine/fiber-helpers.js → tools/fiber-helpers.js
File renamed without changes
View
16 engine/files.js → tools/files.js
@@ -189,7 +189,7 @@ var files = module.exports = {
// Are we running Meteor from a git checkout?
in_checkout: function () {
try {
- if (fs.existsSync(path.join(files.getCurrentEngineDir(), '.git')))
+ if (fs.existsSync(path.join(files.getCurrentToolsDir(), '.git')))
return true;
} catch (e) { console.log(e);}
@@ -208,13 +208,13 @@ var files = module.exports = {
return !files.in_checkout();
},
- // Read the '.engine_version.txt' file. If in a checkout, throw an error.
- getEngineVersion: function () {
+ // Read the '.tools_version.txt' file. If in a checkout, throw an error.
+ getToolsVersion: function () {
if (!files.in_checkout()) {
return fs.readFileSync(
- path.join(files.getCurrentEngineDir(), '.engine_version.txt'), 'utf8');
+ path.join(files.getCurrentToolsDir(), '.tools_version.txt'), 'utf8');
} else {
- throw new Error("Unexpected. Git checkouts don't have engine versions.");
+ throw new Error("Unexpected. Git checkouts don't have tools versions.");
}
},
@@ -222,13 +222,13 @@ var files = module.exports = {
// install, or (checkout root)/dev_bundle in a checkout..)
get_dev_bundle: function () {
if (files.in_checkout())
- return path.join(files.getCurrentEngineDir(), 'dev_bundle');
+ return path.join(files.getCurrentToolsDir(), 'dev_bundle');
else
- return files.getCurrentEngineDir();
+ return files.getCurrentToolsDir();
},
// Return the top-level directory for this meteor install or checkout
- getCurrentEngineDir: function () {
+ getCurrentToolsDir: function () {
return path.join(__dirname, '..');
},
View
42 engine/meteor.js → tools/meteor.js
@@ -72,7 +72,7 @@ Fiber(function () {
// If the releases directory in local warehouse is empty, fetch the
// latest release from our servers. This release may require a
- // different engine, in which case we'll springboard later.
+ // different tools, in which case we'll springboard later.
var ensureSomeRelease = function () {
if (!warehouse.latestRelease()) {
warehouse.fetchLatestRelease();
@@ -399,14 +399,14 @@ Fiber(function () {
var didUpdate = warehouse.fetchLatestRelease();
// we need to update the global releaseVersion variable
- // because that's what engineSpringboard reads
+ // because that's what toolsSpringboard reads
/* global */ releaseVersion = warehouse.latestRelease();
// XXX make errors look good
if (didUpdate) {
console.log("Updated Meteor to release " + releaseVersion + ".");
- engineSpringboard(['--updated-from=' + updatedFrom]);
- // If the engine for release is different, then engineSpringboard
+ toolsSpringboard(['--updated-from=' + updatedFrom]);
+ // If the tools for release is different, then toolsSpringboard
// execs and does not return. Otherwise, keeps going.
}
@@ -414,7 +414,7 @@ Fiber(function () {
// XXX this next line is WRONG, which suggests that the logic for
// updatedFrom is wrong. (updatedFrom can be an app's version, not
// just global version.)
- engineDebugMessage("Globally updated from " + updatedFrom + " to "
+ toolsDebugMessage("Globally updated from " + updatedFrom + " to "
+ releaseVersion);
// ... here is a chance to update the bootstrap script, etc
// ... maybe print out some release notes or something
@@ -828,30 +828,30 @@ Fiber(function () {
}
});
- // Prints a message if $METEOR_ENGINE_DEBUG is set.
+ // Prints a message if $METEOR_TOOLS_DEBUG is set.
// XXX We really should have a better logging system.
- var engineDebugMessage = function (msg) {
- if (process.env.METEOR_ENGINE_DEBUG)
- console.log("[ENGINE DEBUG] " + msg);
+ var toolsDebugMessage = function (msg) {
+ if (process.env.METEOR_TOOLS_DEBUG)
+ console.log("[TOOLS DEBUG] " + msg);
};
// As the first step of running the Meteor CLI, check which Meteor
// release we should be running against. Then, check whether the
- // engine corresponding to that release is the same as the one
- // we're running. If not, springboard to the right engine (after
+ // tools corresponding to that release is the same as the one
+ // we're running. If not, springboard to the right tools (after
// having fetched it to the local warehouse)
- var engineSpringboard = function (extraArgs) {
+ var toolsSpringboard = function (extraArgs) {
var releaseManifest = warehouse.releaseManifestByVersion(releaseVersion);
- if (releaseManifest.engine === files.getEngineVersion())
+ if (releaseManifest.tools === files.getToolsVersion())
return;
- engineDebugMessage("springboarding from " + files.getEngineVersion() +
- " to " + releaseManifest.engine);
+ toolsDebugMessage("springboarding from " + files.getToolsVersion() +
+ " to " + releaseManifest.tools);
// Strip off the "node" and "meteor.js" from argv and replace it with the
- // appropriate engine's meteor shell script.
+ // appropriate tools's meteor shell script.
var newArgv = process.argv.slice(2);
- newArgv.unshift(path.join(warehouse.getEngineDir(releaseManifest.engine),
+ newArgv.unshift(path.join(warehouse.getToolsDir(releaseManifest.tools),
'bin', 'meteor'));
if (extraArgs)
newArgv.push.apply(newArgv, extraArgs);
@@ -873,15 +873,15 @@ Fiber(function () {
var argv = optimist.argv;
/*global*/ releaseVersion = calculateReleaseVersion(argv);
- engineDebugMessage("Running Meteor Release " + releaseVersion);
+ toolsDebugMessage("Running Meteor Release " + releaseVersion);
- // if we're not running the correct engine, fetch it and
+ // if we're not running the correct tools, fetch it and
// re-run. do *not* do this if we are in a checkout, or if
// process.env.TEST_WAREHOUSE_DIR is set. This hook allows unit
- // tests to test the current engine's ability to run other
+ // tests to test the current tools's ability to run other
// releases.
if (!files.in_checkout() && !process.env.TEST_WAREHOUSE_DIR)
- engineSpringboard();
+ toolsSpringboard();
if (argv.help) {
argv._.splice(0, 0, "help");
View
0  engine/meteor_npm.js → tools/meteor_npm.js
File renamed without changes
View
0  engine/mongo_exit_codes.js → tools/mongo_exit_codes.js
File renamed without changes
View
0  engine/mongo_runner.js → tools/mongo_runner.js
File renamed without changes
View
2  engine/packages.js → tools/packages.js
@@ -435,7 +435,7 @@ var packages = module.exports = {
// If we're running out of a git checkout of meteor, use the packages from
// the git tree.
if (!files.usesWarehouse())
- packageDirs.push(path.join(files.getCurrentEngineDir(), 'packages'));
+ packageDirs.push(path.join(files.getCurrentToolsDir(), 'packages'));
// Only return directories that exist.
return _.filter(packageDirs, function (dir) {
View
3  engine/project.js → tools/project.js
@@ -70,8 +70,7 @@ var project = module.exports = {
return project._trim_line(project._get_lines(releasePath)[0]);
else
// This is a legacy app with no '.meteor/release'
- // file. Default to the first release separating engine from
- // packages
+ // file. Default to the first release of Engine.
return '0.6.0';
},
View
2  engine/run.js → tools/run.js
@@ -338,7 +338,7 @@ var DependencyWatcher = function (
// contain individual files)
self.bulk_dirs = [];
_.each(deps.core || [], function (filepath) {
- self.bulk_dirs.push(path.join(files.getCurrentEngineDir(), filepath));
+ self.bulk_dirs.push(path.join(files.getCurrentToolsDir(), filepath));
});
_.each(deps.app || [], function (filepath) {
self.bulk_dirs.push(path.join(self.app_dir, filepath));
View
2  engine/server/server.js → tools/server/server.js
@@ -13,7 +13,7 @@ var useragent = require('useragent');
var _ = require('underscore');
-// This code is duplicated in engine/server/server.js.
+// This code is duplicated in tools/server/server.js.
var MIN_NODE_VERSION = 'v0.8.18';
if (require('semver').lt(process.version, MIN_NODE_VERSION)) {
process.stderr.write(
View
0  engine/tests/empty-app/.meteor/.gitignore → tools/skel/.meteor/.gitignore
File renamed without changes
View
0  engine/skel/.meteor/packages → tools/skel/.meteor/packages
File renamed without changes
View
0  engine/skel/~name~.css → tools/skel/~name~.css
File renamed without changes
View
0  engine/skel/~name~.html → tools/skel/~name~.html
File renamed without changes
View
0  engine/skel/~name~.js → tools/skel/~name~.js
File renamed without changes
View
0  ...tests/app-with-package/.meteor/.gitignore → tools/test-runner-app/.meteor/.gitignore
File renamed without changes
View
0  engine/test-runner-app/.meteor/packages → tools/test-runner-app/.meteor/packages
File renamed without changes
View
0  engine/test-runner-app/.meteor/.gitignore → ...tests/app-with-package/.meteor/.gitignore
File renamed without changes
View
0  ...e/tests/app-with-package/.meteor/packages → ...s/tests/app-with-package/.meteor/packages
File renamed without changes
View
0  engine/skel/.meteor/.gitignore → tools/tests/empty-app/.meteor/.gitignore
File renamed without changes
View
0  engine/tests/empty-app/.meteor/packages → tools/tests/empty-app/.meteor/packages
File renamed without changes
View
0  engine/tests/test_bundler.js → tools/tests/test_bundler.js
File renamed without changes
View
2  engine/tests/test_bundler_npm.js → tools/tests/test_bundler_npm.js
@@ -244,7 +244,7 @@ assert.doesNotThrow(function () {
// shared state, such as cached compiled packages
try {
var result = meteorNpm._execFileSync(
- path.join(files.getCurrentEngineDir(), "meteor"),
+ path.join(files.getCurrentToolsDir(), "meteor"),
["bundle", path.join(tmpDirToPutBundleTarball, "bundle.tar.gz")],
{cwd: tmpAppDir});
files.rm_recursive(tmpDirToPutBundleTarball);
View
0  engine/tests/test_bundler_options.js → tools/tests/test_bundler_options.js
File renamed without changes
View
0  engine/updater.js → tools/updater.js
File renamed without changes
View
68 engine/warehouse.js → tools/warehouse.js
@@ -1,19 +1,19 @@
-/// We store a "warehouse" of engines, releases and packages on
+/// We store a "warehouse" of tools, releases and packages on
/// disk. This warehouse is populated from our servers, as needed.
///
/// Directory structure:
///
-/// meteor (relative path symlink to engines/latest/bin/meteor)
-/// engines/ (not in checkout, since we run against checked-out code)
-/// latest/ (relative path symlink to latest x.y.z/ engine directory)
-/// x.y.z/
+/// meteor (relative path symlink to tools/latest/bin/meteor)
+/// tools/ (not in checkout, since we run against checked-out code)
+/// latest/ (relative path symlink to latest VERSION/ tools directory)
+/// VERSION/
/// releases/
/// latest (relative path symlink to latest x.y.z.release.json)
/// x.y.z.release.json
/// x.y.z.changelog.json
/// packages/
/// foo/
-/// x.y.z/
+/// VERSION/
///
/// When running from a checkout, there is only one acceptable release - 'none', which
/// has an empty manifest, ensuring that we only load local packages (in CHECKOUT/packages
@@ -41,7 +41,7 @@ var symlinkOverSync = function (linkText, file) {
var warehouse = module.exports = {
- // Return our loaded collection of engines, releases and
+ // Return our loaded collection of tools, releases and
// packages. If we're running an installed version, found at
// $HOME/.meteor.
getWarehouseDir: function () {
@@ -58,8 +58,8 @@ var warehouse = module.exports = {
return path.join(process.env.HOME, '.meteor');
},
- getEngineDir: function (version) {
- return path.join(warehouse.getWarehouseDir(), 'engines', version);
+ getToolsDir: function (version) {
+ return path.join(warehouse.getWarehouseDir(), 'tools', version);
},
// If you're running from a git checkout, only accept 'none' and
@@ -100,18 +100,18 @@ var warehouse = module.exports = {
return linkText.replace(/\.release\.json$/, '');
},
- _latestEngineSymlinkPath: function () {
- return path.join(warehouse.getWarehouseDir(), 'engines', 'latest');
+ _latestToolsSymlinkPath: function () {
+ return path.join(warehouse.getWarehouseDir(), 'tools', 'latest');
},
- // Look in the warehouse for the latest engine version. (This is the one that
+ // Look in the warehouse for the latest tools version. (This is the one that
// the meteor shell script runs initially). If the symlink doesn't exist
// (which shouldn't happen, since it is provided in the bootstrap tarball)
// returns null.
- latestEngine: function() {
- var latestEngineSymlink = warehouse._latestEngineSymlinkPath();
+ latestTools: function() {
+ var latestToolsSymlink = warehouse._latestToolsSymlinkPath();
try {
- return fs.readlinkSync(latestEngineSymlink);
+ return fs.readlinkSync(latestToolsSymlink);
} catch (e) {
return null;
}
@@ -134,11 +134,11 @@ var warehouse = module.exports = {
warehouse._populateWarehouseForRelease(releaseName, background);
var latestReleaseManifest = warehouse.releaseManifestByVersion(releaseName);
- // First, make sure the latest engine symlink reflects the latest installed
+ // First, make sure the latest tools symlink reflects the latest installed
// release.
- if (latestReleaseManifest.engine !== warehouse.latestEngine()) {
- symlinkOverSync(latestReleaseManifest.engine,
- warehouse._latestEngineSymlinkPath());
+ if (latestReleaseManifest.tools !== warehouse.latestTools()) {
+ symlinkOverSync(latestReleaseManifest.tools,
+ warehouse._latestToolsSymlinkPath());
}
var storedLatestRelease = warehouse.latestRelease();
@@ -158,8 +158,8 @@ var warehouse = module.exports = {
path.join(warehouse.getWarehouseDir(), 'packages', name, version, 'package.js'));
},
- engineExistsInWarehouse: function (version) {
- return fs.existsSync(warehouse.getEngineDir(version));
+ toolsExistsInWarehouse: function (version) {
+ return fs.existsSync(warehouse.getToolsDir(version));
},
// fetches the manifest file for the given release version. also fetches
@@ -206,31 +206,31 @@ var warehouse = module.exports = {
// no changelog, proceed
}
- // populate warehouse with engine version for this release
- var engineVersion = releaseManifest.engine;
- if (!warehouse.engineExistsInWarehouse(engineVersion)) {
+ // populate warehouse with tools version for this release
+ var toolsVersion = releaseManifest.tools;
+ if (!warehouse.toolsExistsInWarehouse(toolsVersion)) {
try {
// XXX this sucks. We store all the tarballs in memory. This is huge.
// We should instead stream packages in parallel. Since the node stream
// API is in flux, we should probably wait a bit.
// http://blog.nodejs.org/2012/12/20/streams2/
- var engineTarballFilename =
- "meteor-engine-" + releaseManifest.engine + "-" +
+ var toolsTarballFilename =
+ "meteor-tools-" + releaseManifest.tools + "-" +
warehouse._unameAndArch() + ".tar.gz";
- var engineTarballPath = "/engines/" + releaseManifest.engine + "/"
- + engineTarballFilename;
+ var toolsTarballPath = "/tools/" + releaseManifest.tools + "/"
+ + toolsTarballFilename;
if (!background)
- console.log("Fetching Meteor Engine " + engineVersion + "...");
- var engineTarball = files.getUrl({
- url: PACKAGES_URLBASE + engineTarballPath,
+ console.log("Fetching Meteor Tools " + toolsVersion + "...");
+ var toolsTarball = files.getUrl({
+ url: PACKAGES_URLBASE + toolsTarballPath,
encoding: null
});
- files.extractTarGz(engineTarball,
- warehouse.getEngineDir(engineVersion));
+ files.extractTarGz(toolsTarball,
+ warehouse.getToolsDir(toolsVersion));
} catch (e) {
if (!background)
- console.error("Failed to load engine for release " + releaseVersion);
+ console.error("Failed to load tools for release " + releaseVersion);
throw e;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.