Skip to content

Commit

Permalink
added ignore file list
Browse files Browse the repository at this point in the history
  • Loading branch information
insomnious committed Nov 21, 2023
1 parent 1db0100 commit 4106bd9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ const fs = require('fs');
const childProcess = require('child_process');
require('dotenv').config();

const TEMP_DIR = path.join(__dirname, 'release', 'temp');
const TEMP_DIR = path.join(__dirname, 'temp');

// these were being incorrectly flagged by esigner as malware
// make sure these are lowercase
const ignoreFileList = ['arctool.exe', '7z.exe']

if (!fs.existsSync(TEMP_DIR)) {
fs.mkdirSync(TEMP_DIR, { recursive: true });
Expand All @@ -17,6 +21,11 @@ async function sign(configuration) {
const ES_CREDENTIAL_ID = process.env.ES_CREDENTIAL_ID;
const ES_TOTP_SECRET = process.env.ES_TOTP_SECRET;

if (ignoreFileList.includes(path.basename(configuration.path.toLowerCase()))) {
console.log(`Ignoring ${configuration.path} as the file is in the ignore list`);
return;
}

if (ES_USERNAME && ES_PASSWORD && ES_TOTP_SECRET && ES_CREDENTIAL_ID) {

console.log(`Signing ${configuration.path}`);
Expand Down

0 comments on commit 4106bd9

Please sign in to comment.