Skip to content

Commit

Permalink
add skip signing flag for build script
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Nov 30, 2023
1 parent aa9b146 commit cfa0ae3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
run: npm install

- name: Build
run: node release/build.js --target itch-setup
run: node release/build.js --target itch-setup --skip-signing
10 changes: 8 additions & 2 deletions release/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ async function main(args) {
os: detectOS(),
arch: DEFAULT_ARCH,
target: "missing",
skipSigning: false,
};

for (let i = 0; i < args.length; i++) {
Expand All @@ -84,6 +85,11 @@ async function main(args) {
continue;
}

if (k == "skip-signing") {
opts.skipSigning = true;
continue;
}

if (k === "os" || k === "arch" || k === "target") {
i++;
let v = args[i];
Expand Down Expand Up @@ -224,7 +230,7 @@ async function main(args) {
$(`go build -a -ldflags "${ldFlags}" ${goTags} -o ${target}`);
$(`file ${target}`);

if (opts.os === "windows") {
if (opts.os === "windows" && !opts.skipSigning) {
verifyCoIncrementMTAUsage(target);

console.log(`Signing Windows binary...`);
Expand All @@ -242,7 +248,7 @@ async function main(args) {
$(`tools/signtool.exe ${signArgs.join(" ")}`);
}

if (opts.os === "darwin") {
if (opts.os === "darwin" && !opts.skipSigning) {
console.log(`Signing macOS binary...`);
let signKey = "Developer ID Application: itch corp. (AK2D34UDP2)";
$(`codesign --deep --force --verbose --sign "${signKey}" "${target}"`);
Expand Down

0 comments on commit cfa0ae3

Please sign in to comment.