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

Introduce entitlements automation #44

Merged
merged 7 commits into from
Jun 1, 2016

Conversation

sethlu
Copy link
Contributor

@sethlu sethlu commented May 28, 2016

Fix #41
Blocked by #45

- Fixes electron#41
- Added opts.version/—version to apply suitable pre/post operations
- Added opts[‘pre-auto-entitlement-app-group’] /
—pre-auto-entitlement-app-group to trigger entitlement automation with
app group setting
@sethlu sethlu force-pushed the automate-entitlements-by-info-plist branch from bef7033 to 184985a Compare June 1, 2016 04:34
@sethlu sethlu force-pushed the automate-entitlements-by-info-plist branch from 806a658 to 435d08b Compare June 1, 2016 05:09
Deprecate `pre-auto-entitlement-app-group` and introduce
`no-pre-auto-entitlements`
@sethlu sethlu force-pushed the automate-entitlements-by-info-plist branch from 0fa4517 to 696f3f4 Compare June 1, 2016 07:40
@sethlu sethlu merged commit 0d04b23 into electron:master Jun 1, 2016
@@ -384,7 +384,7 @@ function signApplicationAsync (opts) {
})
.then(function () {
debuglog('Signing... ' + opts.app)
execFileAsync('codesign', args.concat('--entitlements', opts.entitlements, opts.app))
Copy link
Contributor Author

@sethlu sethlu Jun 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@develar This may have caused a branching in async methods with thenables I think. 😕
What happened then is that verification (which should be after this promise fulfills) starts at a same time!? so code cannot be verified. But with the fix on the right, the verification starts after signing the app on this line.

I was slightly confused when encountering this.

Copy link
Contributor

@develar develar Jun 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, don't quite understand what do you mean.

What happened then is that verification (which should be after this promise fulfills) starts at a same time!?

How it can be? It is called in handler promise.then, so, it is ok.

return promise
        .then(function () {
          // Verify code sign
          debuglog('Verifying code sign...')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, but my understanding back then is that: If a promise is returned from a function, that function .then() only works after the promise's fulfilled. However, if nothing's returned from a function yet a promise is created, that function .then() starts immediately instead of waiting for that promise to be fulfilled... Not sure if this is an intelligible saying. 😖
Anyway... It works with the return lol.

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

Successfully merging this pull request may close these issues.

2 participants