Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/5.0.0 #786

Merged
merged 8 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions after_sign_hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ const path = require('path');
var electron_notarize = require('electron-notarize');

module.exports = async function(params) {
// Only notarize the app on Mac OS only.
for (var key of params.platformToTargets.keys()) {
if (key.name !== 'mac') {
return;
}
}

console.log('afterSign hook triggered');
// Only notarize the app on Mac OS only.
if (params.electronPlatformName !== 'darwin') {
return;
}
console.log('afterSign hook triggered', params);

if (!process.env.CIRCLE_TAG || process.env.CIRCLE_TAG.length === 0) {
console.log('Not on a tag. Skipping notarization');
Expand All @@ -20,16 +17,18 @@ module.exports = async function(params) {
// Same appId in electron-builder.
let appId = 'com.automattic.wordpress';

let appPath = path.join(
params.outDir,
`mac/WordPress.com.app`
)
let appPath = params.appOutDir
? path.join(
params.appOutDir,
`${params.packager.appInfo.productFilename}.app`
)
: params.artifactPaths[0].replace(new RegExp('.blockmap'), '');

if (!fs.existsSync(appPath)) {
if (!fs.existsSync(appPath)) {
throw new Error(`Cannot find application at: ${appPath}`);
}

console.log(`Notarizing ${appId} found at ${appPath}`);
console.log(`Notarizing ${appId} found at ${appPath}`);

try {
await electron_notarize.notarize({
Expand All @@ -43,5 +42,5 @@ module.exports = async function(params) {
console.error(error);
}

console.log(`Done notarizing ${appPath}`);
console.log(`Done notarizing ${appId}`);
};
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "WordPressDesktop",
"version": "4.7.0",
"version": "5.0.0",
"repository": {
"type": "git",
"url": "https://github.com/Automattic/wp-desktop/"
Expand Down Expand Up @@ -93,6 +93,7 @@
"appId": "com.automattic.wordpress",
"asar": false,
"directories": {
"buildResources": "./resource/icons",
"output": "./release"
},
"files": [
Expand All @@ -110,7 +111,6 @@
}
],
"mac": {
"icon": "./resource/image/mac/app-icon.icns",
"category": "public.app-category.social-networking",
"entitlements": "./resource/macos/entitlements.mac.plist",
"entitlementsInherit": "./resource/macos/entitlements.mac.inherit.plist",
Expand All @@ -121,9 +121,7 @@
},
"dmg": {
"title": "WordPress.com Installer",
"icon": "./resource/image/mac/dmg-icon.icns",
"iconSize": 150,
"background": "./resource/image/mac/dmg-background/background.png",
"contents": [
{
"x": 486,
Expand All @@ -146,7 +144,6 @@
"ia32"
]
},
"icon": "./resource/image/win/wordpress.ico",
"certificateSubjectName": "Automattic, Inc."
},
"nsis": {
Expand All @@ -157,7 +154,6 @@
"deb",
"tar.gz"
],
"icon": "./resource/image/linux/512x512.png",
"executableName": "wpcom",
"description": "WordPress.com Desktop Client",
"synopsis": "WordPress.com Desktop client",
Expand All @@ -178,6 +174,7 @@
"libnss3"
]
},
"afterSign": "./after_sign_hook.js",
"afterAllArtifactBuild": "./after_sign_hook.js"
}
}
File renamed without changes.
File renamed without changes.
Binary file removed resource/image/linux/icon_128x128.png
Binary file not shown.
Binary file removed resource/image/linux/[email protected]
Binary file not shown.
Binary file removed resource/image/linux/icon_16x16.png
Binary file not shown.
Binary file removed resource/image/linux/[email protected]
Binary file not shown.
Binary file removed resource/image/linux/icon_256x256.png
Binary file not shown.
Binary file removed resource/image/linux/[email protected]
Binary file not shown.
Binary file removed resource/image/linux/icon_32x32.png
Binary file not shown.
Binary file removed resource/image/linux/[email protected]
Binary file not shown.
Binary file removed resource/image/linux/icon_512x512.png
Binary file not shown.
Binary file removed resource/image/linux/[email protected]
Binary file not shown.
Binary file removed resource/image/mac/dmg-icon.icns
Binary file not shown.