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

Added support for supplying a value for the ‘ignore’ electron-osx-sign property. #5262

Closed

Conversation

bedney
Copy link
Contributor

@bedney bedney commented Aug 27, 2020

This PR allows users of electron-builder to supply additional files to the electron-osx-sign utility to ignore during the signing process.

NOTE: This PR follows the electron-osx-sign utility's signature for this property. That is, it is either a single RegExp as a JSON String or an Array of JSON Strings of RegExps. It is NOT a 'glob' pattern, like many of the other config properties in electron-builder. That was more sophistication than I needed.

In any case, you use this patch in your config like this:

{
    "appId": "...",
    "mac": {
        ...
        "ignore": ".*\\.app$",
        ...
    }
}

Note the escaping of the backslash there, as you might expect.

In this case, we are filtering for files/directories ending with .app (I had one of those and the electron-osx-sign wants to think that they're embedded Mac OS X applications, but this wasn't).

Here's the Array version:

{
    "appId": "...",
    "mac": {
        ...
        "ignore": [".*\\.app$", ..., ...]
        ...
    }
}

Note that this closes #3790.

@bedney
Copy link
Contributor Author

bedney commented Sep 21, 2020

@develar -

Can you merge this PR? If you feel like more work needs to be done on it, I can help. Otherwise, this is blocking us - we need to be able to exclude files/directories from the signing process.

Thanks!

@develar
Copy link
Member

develar commented Sep 22, 2020

Thanks for PR, I renamed option from ignore to signIgnore. Release will be today.

develar pushed a commit to develar/electron-builder that referenced this pull request Sep 22, 2020
develar pushed a commit to develar/electron-builder that referenced this pull request Sep 22, 2020
develar pushed a commit to develar/electron-builder that referenced this pull request Sep 22, 2020
develar pushed a commit to develar/electron-builder that referenced this pull request Sep 22, 2020
develar pushed a commit to develar/electron-builder that referenced this pull request Sep 22, 2020
develar pushed a commit to develar/electron-builder that referenced this pull request Sep 22, 2020
develar pushed a commit to develar/electron-builder that referenced this pull request Sep 22, 2020
@develar develar closed this in aa3625d Sep 22, 2020
@ym13349140
Copy link

ym13349140 commented Feb 9, 2022

This PR allows users of electron-builder to supply additional files to the electron-osx-sign utility to ignore during the signing process.

NOTE: This PR follows the electron-osx-sign utility's signature for this property. That is, it is either a single RegExp as a JSON String or an Array of JSON Strings of RegExps. It is NOT a 'glob' pattern, like many of the other config properties in electron-builder. That was more sophistication than I needed.

In any case, you use this patch in your config like this:

{
    "appId": "...",
    "mac": {
        ...
        "ignore": ".*\\.app$",
        ...
    }
}

Note the escaping of the backslash there, as you might expect.

In this case, we are filtering for files/directories ending with .app (I had one of those and the electron-osx-sign wants to think that they're embedded Mac OS X applications, but this wasn't).

Here's the Array version:

{
    "appId": "...",
    "mac": {
        ...
        "ignore": [".*\\.app$", ..., ...]
        ...
    }
}

Note that this closes #3790.

@bedney Hello, I have some dll files in my project that were signed failed on MacOS when I run electron: build, so I recently
tried to use signIgnore to ignore some .dll files in my projects, but it dosen't work.
these dll files are in ./dist_electron/mac/application/Contents directory, I tried many times of different value , including ./dist_electron/mac/application/Contents/xxx.dll , .dll$ and array value '[.dll$]', but it never make sense, is there any worng?
My config options and my dist_electron directory are as follows:

mac: {
    icon: './dist_electron/icons/icon.icns',
    signIgnore: '.*\\.dll$'
}

dist_electron

I'd be really appreciateful if you can reply.

@ferenc-a
Copy link

Apparently signIgnore does not apply to the .app/Contents/ directory: #6085 (comment), as a limitation of electron-osx-sign.
I'm still looking for a solution to this, but haven't seen an actual one yet. @ym13349140 what did you end up doing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to ignore files for signing
4 participants