Skip to content

Commit

Permalink
Support for codesign (#94)
Browse files Browse the repository at this point in the history
Add support for mac codesign
  • Loading branch information
lichtl authored Nov 10, 2019
1 parent 533d62e commit 0954ae7
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 4 deletions.
23 changes: 21 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const pkg = require("./package.json");
const fs = require("fs");
const path = require("path");
const exec = require("child_process").exec;
const execSync = require("child_process").execSync;

const zip = require("gulp-zip");
const del = require("del");
Expand All @@ -17,6 +18,7 @@ const yarn = require("gulp-yarn");
const rename = require("gulp-rename");
const os = require("os");
const git = require("git-rev-sync");
const commandExistsSync = require("command-exists").sync;

const DIST_DIR = "./dist/";
const APPS_DIR = "./apps/";
Expand All @@ -27,7 +29,10 @@ var nwBuilderOptions = {
version: "0.36.4",
files: "./dist/**/*",
macIcns: './images/icon_128.icns',
macPlist: { CFBundleDisplayName: "KISS GUI" },
macPlist: {
CFBundleDisplayName: "KISS GUI",
CFBundleIdentifier: "com.flyduino.kissgui"
},
// winIco: './images/icon_128.ico',
zip: false
};
Expand Down Expand Up @@ -431,6 +436,20 @@ function compressFiles(srcPath, basePath, outputFile, zipFolder) {


// Create distribution package for macOS platform
function osx64_sign(done) {
if (commandExistsSync("tmp/codesign.sh")) {
console.log("Codesign activity...");
execSync("tmp/codesign.sh", function(error, stdOut, stdErr) {
});
} else {
console.log("No valid script for codesign");
}
//release_zip("osx64",done);
release_osx64(done);
return done();
}


function release_osx64(done) {
// Create DMG
createDirIfNotExists(RELEASE_DIR);
Expand Down Expand Up @@ -509,7 +528,7 @@ function listReleaseTasks(done) {
if (platforms.indexOf("osx64") !== -1) {

releaseTasks.push(function release_osx64_dmg(done) {
return release_osx64(done);
return osx64_sign(done);
});

releaseTasks.push(function release_osx64_zip() {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
},
"devDependencies": {
"archiver": "^3.0.0",
"command-exists": "^1.2.8",
"del": "^4.1.0",
"follow-redirects": "^1.7.0",
"fs-extra": "^7.0.1",
Expand All @@ -43,10 +44,12 @@
"gulp-rename": "^1.4.0",
"gulp-yarn": "^2.0.0",
"gulp-zip": "^4.2.0",
"makensis": "^0.18.1",
"nw": "^0.37.4",
"nw-builder": "^3.5.7",
"os": "^0.1.1",
"platform-dependent-modules": "0.0.14",
"rpm-builder": "^1.1.0",
"targz": "^1.0.1",
"temp": "^0.9.0"
},
Expand Down
99 changes: 97 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# yarn lockfile v1


"@nsis/language-data@^0.7.1":
version "0.7.1"
resolved "https://registry.yarnpkg.com/@nsis/language-data/-/language-data-0.7.1.tgz#5641317ac100a38e4290be6d4c1e4166acae47c5"
integrity sha512-KqRRvwOXnNsSEpTufe53ws4cSf5BgCh7rJLAAgrBeatefBT4SDpyjfGw8J/YisI4XYAKO9c4IZXSpCkRIQbn1Q==

"@types/events@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
Expand Down Expand Up @@ -76,6 +81,11 @@ ansi-red@^0.1.1:
dependencies:
ansi-wrap "0.1.0"

ansi-regex@^0.2.0, ansi-regex@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9"
integrity sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=

ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
Expand All @@ -86,6 +96,11 @@ ansi-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=

ansi-styles@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de"
integrity sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=

ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
Expand Down Expand Up @@ -558,6 +573,17 @@ caw@^2.0.0:
tunnel-agent "^0.6.0"
url-to-options "^1.0.1"

chalk@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
integrity sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=
dependencies:
ansi-styles "^1.1.0"
escape-string-regexp "^1.0.0"
has-ansi "^0.1.0"
strip-ansi "^0.3.0"
supports-color "^0.2.0"

chalk@^2.0.1, chalk@^2.3.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
Expand Down Expand Up @@ -706,6 +732,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"

command-exists@^1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.8.tgz#715acefdd1223b9c9b37110a149c6392c2852291"
integrity sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==

commander@~2.8.1:
version "2.8.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4"
Expand Down Expand Up @@ -869,6 +900,11 @@ dashdash@^1.12.0:
dependencies:
assert-plus "^1.0.0"

dateformat@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
integrity sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=

[email protected], debug@^2.2.0, debug@^2.3.3:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
Expand Down Expand Up @@ -1131,7 +1167,7 @@ es6-weak-map@^2.0.1:
es6-iterator "^2.0.3"
es6-symbol "^3.1.1"

[email protected], escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
[email protected], escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
Expand Down Expand Up @@ -1431,6 +1467,15 @@ fs-extra@^0.30.0:
path-is-absolute "^1.0.0"
rimraf "^2.2.8"

fs-extra@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950"
integrity sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=
dependencies:
graceful-fs "^4.1.2"
jsonfile "^2.1.0"
klaw "^1.0.0"

fs-extra@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
Expand Down Expand Up @@ -1779,6 +1824,13 @@ har-validator@~5.1.0:
ajv "^6.5.5"
har-schema "^2.0.0"

has-ansi@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e"
integrity sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=
dependencies:
ansi-regex "^0.2.0"

has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
Expand Down Expand Up @@ -2406,7 +2458,7 @@ lodash.union@^4.6.0:
resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88"
integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=

lodash@^4.17.14, lodash@^4.8.0, lodash@~4.17.4:
lodash@^4.17.14, lodash@^4.17.4, lodash@^4.8.0, lodash@~4.17.4:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
Expand Down Expand Up @@ -2438,6 +2490,13 @@ make-iterator@^1.0.0:
dependencies:
kind-of "^6.0.2"

makensis@^0.18.1:
version "0.18.1"
resolved "https://registry.yarnpkg.com/makensis/-/makensis-0.18.1.tgz#0a64b65c0e07beb0d63cf24e60d350871d212c7f"
integrity sha512-fu5pdGUR4Dj6dWgXu2joDKoK0wgiDa9NHV/cZLwv2uIa+SzUq0wLvQwophNiIX5VvfOYv1YoogTZHZl4AbZL1A==
dependencies:
"@nsis/language-data" "^0.7.1"

map-cache@^0.2.0, map-cache@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
Expand Down Expand Up @@ -2585,6 +2644,11 @@ nan@^2.12.1:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==

nanoid@^2.1.0:
version "2.1.6"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.6.tgz#0665418f692e54cf44f34d4010761f3240a03314"
integrity sha512-2NDzpiuEy3+H0AVtdt8LoFi7PnqkOnIzYmJQp7xsEU6VexLluHQwKREuiz57XaQC5006seIadPrIZJhyS2n7aw==

nanomatch@^1.2.9:
version "1.2.13"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
Expand Down Expand Up @@ -3394,6 +3458,18 @@ rimraf@~2.6.2:
dependencies:
glob "^7.1.3"

rpm-builder@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/rpm-builder/-/rpm-builder-1.1.0.tgz#21b031b2ecec8d7377a59dc276c43dff6cd9346c"
integrity sha512-cvR3LywWjw+gX9aefmoATcK19Cx3WhnH0toB0aOyxy+qj3Sh8hDD/RxIopei9iVMvdwC3oJb6+aW3UmbdQIHgQ==
dependencies:
chalk "^0.5.1"
dateformat "^2.0.0"
fs-extra "^1.0.0"
globby "^6.1.0"
lodash "^4.17.4"
shortid "^2.1.3"

safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
Expand Down Expand Up @@ -3483,6 +3559,13 @@ [email protected]:
interpret "^1.0.0"
rechoir "^0.6.2"

shortid@^2.1.3:
version "2.2.15"
resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.15.tgz#2b902eaa93a69b11120373cd42a1f1fe4437c122"
integrity sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==
dependencies:
nanoid "^2.1.0"

signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
Expand Down Expand Up @@ -3661,6 +3744,13 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

strip-ansi@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.3.0.tgz#25f48ea22ca79187f3174a4db8759347bb126220"
integrity sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=
dependencies:
ansi-regex "^0.2.1"

strip-ansi@^3.0.0, strip-ansi@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
Expand Down Expand Up @@ -3721,6 +3811,11 @@ strip-outer@^1.0.0:
dependencies:
escape-string-regexp "^1.0.2"

supports-color@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a"
integrity sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=

supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
Expand Down

0 comments on commit 0954ae7

Please sign in to comment.