From 40f881a7189ee46267b3421140698d666f910f7a Mon Sep 17 00:00:00 2001 From: Stefan Buck Date: Fri, 24 Apr 2015 15:48:09 +0200 Subject: [PATCH] Add set version support --- index.js | 5 +++++ readme.md | 1 + 2 files changed, 6 insertions(+) diff --git a/index.js b/index.js index 9106c69..e598bc8 100644 --- a/index.js +++ b/index.js @@ -57,6 +57,7 @@ module.exports = function packager (opts, cb) { var bundleId = opts['app-bundle-id'] || 'com.atom-shell.' + opts.name.toLowerCase() var bundleHelperId = opts['helper-bundle-id'] || 'com.atom-shell.' + opts.name.toLowerCase() + '.helper' + var appVersion = opts['app-version'] pl1.CFBundleDisplayName = opts.name pl1.CFBundleIdentifier = bundleId @@ -64,6 +65,10 @@ module.exports = function packager (opts, cb) { pl2.CFBundleIdentifier = bundleHelperId pl2.CFBundleName = opts.name + if (appVersion) { + pl1.CFBundleVersion = appVersion + } + if (opts.protocols) { pl2.CFBundleURLTypes = pl1.CFBundleURLTypes = opts.protocols.map(function (protocol) { return { diff --git a/readme.md b/readme.md index 5f158af..71438c9 100644 --- a/readme.md +++ b/readme.md @@ -43,6 +43,7 @@ these are optional CLI options you can pass in - `out` (default current working dir) - the dir to put the app into at the end - `version` (default hardcoded in source) - atom-shell version to use - `app-bundle-id` - bundle identifier to use in the app plist +- `app-version` - version to set for the app - `helper-bundle-id` - bundle identifier to use in the app helper plist - `ignore` (default none) - do not copy files into App whose filenames regex .match this string - `prune` - runs `npm prune --production` on the app