ci: mac code sign (#585)
* ci: register certificate into the mac keychain * try to not use yarn electron-builder installer on mac * use -P * debug electron-osx-sign * use cscLink * use xcode xcode9.3beta * increase package.json version * revert version to 1.1.1 * delete unused files * format release.js file * format release.js file * format release.js file
This commit is contained in:
committed by
László Monda
parent
1ca8e67e52
commit
990ff8e980
@@ -11,7 +11,7 @@ matrix:
|
|||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode9.2
|
osx_image: xcode9.3beta
|
||||||
- os: linux
|
- os: linux
|
||||||
env: CC=clang CXX=clang++ npm_config_clang=1
|
env: CC=clang CXX=clang++ npm_config_clang=1
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
|||||||
1041
package-lock.json
generated
1041
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"author": "Ultimate Gadget Laboratories",
|
"author": "Ultimate Gadget Laboratories",
|
||||||
"main": "electron/dist/electron-main.js",
|
"main": "electron/dist/electron-main.js",
|
||||||
"version": "1.1.2",
|
"version": "1.1.1",
|
||||||
"firmwareVersion": "8.1.2",
|
"firmwareVersion": "8.1.2",
|
||||||
"deviceProtocolVersion": "4.2.0",
|
"deviceProtocolVersion": "4.2.0",
|
||||||
"userConfigVersion": "4.0.0",
|
"userConfigVersion": "4.0.0",
|
||||||
@@ -37,11 +37,11 @@
|
|||||||
"decompress-tarbz2": "^4.1.1",
|
"decompress-tarbz2": "^4.1.1",
|
||||||
"devtron": "1.4.0",
|
"devtron": "1.4.0",
|
||||||
"electron": "1.7.11",
|
"electron": "1.7.11",
|
||||||
"electron-builder": "19.45.5",
|
"electron-builder": "20.4.0",
|
||||||
"electron-debug": "1.4.0",
|
"electron-debug": "1.4.0",
|
||||||
"electron-devtools-installer": "2.2.0",
|
"electron-devtools-installer": "2.2.0",
|
||||||
"electron-log": "2.2.9",
|
"electron-log": "2.2.9",
|
||||||
"electron-rebuild": "1.6.0",
|
"electron-rebuild": "1.7.3",
|
||||||
"electron-settings": "3.1.2",
|
"electron-settings": "3.1.2",
|
||||||
"exports-loader": "0.6.3",
|
"exports-loader": "0.6.3",
|
||||||
"file-loader": "0.10.0",
|
"file-loader": "0.10.0",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
const jsonfile = require('jsonfile');
|
const jsonfile = require('jsonfile');
|
||||||
const exec = require('child_process').execSync;
|
const exec = require('child_process').execSync;
|
||||||
|
|
||||||
const TEST_BUILD = process.env.TEST_BUILD;// set true if you would like to test on your local machine
|
const TEST_BUILD = process.env.TEST_BUILD; // set true if you would like to test on your local machine
|
||||||
// set true if running on your dev mac machine where yarn is installed or not need to install
|
// set true if running on your dev mac machine where yarn is installed or not need to install
|
||||||
const RUNNING_IN_DEV_MODE = process.env.RUNNING_IN_DEV_MODE === 'true';
|
const RUNNING_IN_DEV_MODE = process.env.RUNNING_IN_DEV_MODE === 'true';
|
||||||
const DIR = process.env.DIR;
|
const DIR = process.env.DIR;
|
||||||
@@ -42,13 +42,13 @@ if (!isReleaseCommit) {
|
|||||||
process.exit(0)
|
process.exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === 'darwin' && !RUNNING_IN_DEV_MODE) {
|
// if (process.platform === 'darwin' && !RUNNING_IN_DEV_MODE) {
|
||||||
exec('brew install yarn --without-node');
|
// exec('brew install yarn --without-node');
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!RUNNING_IN_DEV_MODE) {
|
// if (!RUNNING_IN_DEV_MODE) {
|
||||||
exec("yarn add electron-builder");
|
// exec("yarn add electron-builder");
|
||||||
}
|
// }
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const builder = require("electron-builder");
|
const builder = require("electron-builder");
|
||||||
@@ -82,14 +82,13 @@ if (process.platform === 'darwin') {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin' && process.env.CI) {
|
||||||
// TODO: Remove comment when macOS certificates boughted and exported
|
const encryptedFile = path.join(__dirname, './certs/mac-cert.p12.enc');
|
||||||
//require('./setup-macos-keychain').registerKeyChain();
|
const decryptedFile = path.join(__dirname, './certs/mac-cert.p12');
|
||||||
exec('openssl aes-256-cbc -K $CERT_KEY -iv $CERT_IV -in scripts/certs/mac-cert.p12.enc -out scripts/certs/mac-cert.p12 -d')
|
exec(`openssl aes-256-cbc -K $CERT_KEY -iv $CERT_IV -in ${encryptedFile} -out ${decryptedFile} -d`);
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
// decrypt windows certificate
|
// decrypt windows certificate
|
||||||
exec('openssl aes-256-cbc -K %CERT_KEY% -iv %CERT_IV% -in scripts/certs/windows-cert.p12.enc -out scripts/certs/windows-cert.p12 -d')
|
exec('openssl aes-256-cbc -K %CERT_KEY% -iv %CERT_IV% -in scripts/certs/windows-cert.p12.enc -out scripts/certs/windows-cert.p12 -d')
|
||||||
//process.env.CSC_LINK = path.join(__dirname, 'certs/mac-cert.p12');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TEST_BUILD || gitTag) {
|
if (TEST_BUILD || gitTag) {
|
||||||
@@ -119,7 +118,9 @@ if (TEST_BUILD || gitTag) {
|
|||||||
productName: 'UHK Agent',
|
productName: 'UHK Agent',
|
||||||
mac: {
|
mac: {
|
||||||
category: 'public.app-category.utilities',
|
category: 'public.app-category.utilities',
|
||||||
extraResources
|
extraResources,
|
||||||
|
identity: 'CMXCBCFHDG',
|
||||||
|
cscLink: path.join(__dirname, 'certs/mac-cert.p12')
|
||||||
},
|
},
|
||||||
win: {
|
win: {
|
||||||
extraResources,
|
extraResources,
|
||||||
@@ -142,8 +143,7 @@ if (TEST_BUILD || gitTag) {
|
|||||||
console.error(`${error}`);
|
console.error(`${error}`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
})
|
})
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
console.log('No git tag');
|
console.log('No git tag');
|
||||||
// TODO: Need it?
|
// TODO: Need it?
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user