From 6e2fa5f837f8cb55cc1542bcbd040704365b912f Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 12 Mar 2013 16:11:54 -0700 Subject: [PATCH] delete increment-version.js. incrementing a dev bundle version is easy. incrementing the release version is no longer necessary. the relevant files consist of: - things that are really engine version (which is autogenerated from a hash) - the curl install script (which is also really engine version and is part of release blessing now) - debian/rpm stuff (going away) - docs app (which now uses Meteor.release) - manifest.json (the one place you do need to bump to do a release, but this can be done manually) --- tools/admin/increment-version.js | 70 -------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 tools/admin/increment-version.js diff --git a/tools/admin/increment-version.js b/tools/admin/increment-version.js deleted file mode 100644 index 5de25ede6b..0000000000 --- a/tools/admin/increment-version.js +++ /dev/null @@ -1,70 +0,0 @@ - -var fs = require('fs'); -var path = require('path'); -var semver = require('semver'); - - -var optimist = require('optimist'); - -var updater = require('../engine/updater.js')); -var _ = require('underscore'); - -// What files to update. Relative to project root. -// XXX this might be all wrong -var UPDATE_FILES = [path.join('engine', 'updater.js'), - path.join('engine', 'post-upgrade.js'), - path.join('tools', 'admin', 'install-s3.sh'), - path.join('tools', 'admin', 'debian', 'changelog'), - path.join('tools', 'admin', 'meteor.spec'), - path.join('docs', 'client', 'docs.js'), - path.join('docs', 'client', 'docs.html'), - [path.join('tools', 'admin', 'manifest.json'), 'g']]; - -// Files to update for dev_bundle -var BUNDLE_FILES = [path.join('admin', 'generate-dev-bundle.sh'), 'meteor']; - - -var opt = require('optimist') - .alias('dev_bundle', 'd') - .boolean('dev_bundle') - .describe('dev_bundle', 'Update the dev_bundle version, not the main version.') - .alias('new_version', 'n') - .describe('new_version', 'A new version number. Default is to increment patch number.') - .usage('Usage: $0 [options]') -; -var argv = opt.argv; -if (argv.help) { - process.stdout.write(opt.help()); - process.exit(1); -} - -var ENGINE_VERSION = updater.ENGINE_VERSION; -var files = UPDATE_FILES; - -if (argv.dev_bundle) { - var version_path = path.join(__dirname, '..', 'meteor'); - var version_data = fs.readFileSync(version_path, 'utf8'); - var version_match = /BUNDLE_VERSION=([\d\.]+)/.exec(version_data); - ENGINE_VERSION = version_match[1]; - files = BUNDLE_FILES; -} - -var NEW_VERSION = argv.new_version || semver.inc(ENGINE_VERSION, 'patch'); - -console.log("Updating from " + ENGINE_VERSION + " to " + NEW_VERSION); - -_.each(files, function (file) { - var flags = ''; - if (file instanceof Array) { - flags = file[1]; - file = file[0]; - } - var fp = path.join(__dirname, '..', file); - var text = fs.readFileSync(fp, 'utf8'); - var new_text = text.replace(new RegExp(ENGINE_VERSION, flags), NEW_VERSION); - fs.writeFileSync(fp, new_text, 'utf8'); - - console.log("updated file: " + fp); -}); - -console.log("Complete");