diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bee0320..cebcfe6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -27,7 +27,7 @@ yarn format # => format code with SwiftFormat
## Release (Maintainers only)
```bash
-VERSION=3.2.0 node Scripts/update-version.js
+VERSION=3.2 BUILD=0 node Scripts/update-version.js
git add .
git commit -m 'chore: release v3.2.0'
yarn ship:mas # for Mac App Store
diff --git a/Polyglot.xcodeproj/project.pbxproj b/Polyglot.xcodeproj/project.pbxproj
index b31e103..993e535 100644
--- a/Polyglot.xcodeproj/project.pbxproj
+++ b/Polyglot.xcodeproj/project.pbxproj
@@ -620,7 +620,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Polyglot/Polyglot.entitlements;
- CODE_SIGN_IDENTITY = "Mac Developer";
+ CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 58XDWHK3JX;
@@ -646,7 +646,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Polyglot/Polyglot.entitlements;
- CODE_SIGN_IDENTITY = "Mac Developer";
+ CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 58XDWHK3JX;
diff --git a/Polyglot/Info.plist b/Polyglot/Info.plist
index 4fb7bd8..6af524a 100644
--- a/Polyglot/Info.plist
+++ b/Polyglot/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.2.0
+ 3.2
CFBundleVersion
3.2.0
LSApplicationCategoryType
diff --git a/PolyglotSafariExtension/Info.plist b/PolyglotSafariExtension/Info.plist
index 7a1b400..b6d7aae 100644
--- a/PolyglotSafariExtension/Info.plist
+++ b/PolyglotSafariExtension/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 3.2.0
+ 3.2
CFBundleVersion
3.2.0
LSMinimumSystemVersion
diff --git a/Scripts/update-version.js b/Scripts/update-version.js
index e8b503e..f52ef06 100755
--- a/Scripts/update-version.js
+++ b/Scripts/update-version.js
@@ -3,19 +3,25 @@
const path = require("path");
const fs = require("fs");
const assert = require("assert");
+const { execSync } = require("child_process");
const plist = require("plist");
-const bundleVersion = process.env.VERSION;
-assert(bundleVersion, "specify VERSION envvar");
+const shortVersion = process.env.VERSION;
+assert(shortVersion, "specify VERSION envvar");
-console.log(`CFBundleShortVersionString: ${bundleVersion}`);
+const buildId = process.env.BUILD;
+assert(buildId, "specify BUILD envvar");
+
+const bundleVersion = shortVersion + "." + buildId;
+
+console.log(`CFBundleShortVersionString: ${shortVersion}`);
console.log(`CFBundleVersion: ${bundleVersion}`);
// rewrite `Polyglot/Info.plist`
const appInfoPath = path.resolve(__dirname, "../Polyglot/Info.plist");
console.log(`rewriting '${appInfoPath}'`);
const appInfo = plist.parse(fs.readFileSync(appInfoPath, "utf8"));
-appInfo["CFBundleShortVersionString"] = bundleVersion;
+appInfo["CFBundleShortVersionString"] = shortVersion;
appInfo["CFBundleVersion"] = bundleVersion;
fs.writeFileSync(appInfoPath, plist.build(appInfo));
@@ -26,7 +32,7 @@ const extInfoPath = path.resolve(
);
console.log(`rewriting '${extInfoPath}'`);
const extInfo = plist.parse(fs.readFileSync(extInfoPath, "utf8"));
-extInfo["CFBundleShortVersionString"] = bundleVersion;
+extInfo["CFBundleShortVersionString"] = shortVersion;
extInfo["CFBundleVersion"] = bundleVersion;
fs.writeFileSync(extInfoPath, plist.build(extInfo));