What is the problem or limitation you are having?
macOS apps must be notarized; however, the macOS notarisation workflow can take hours to complete.
Briefcase already accommodates this, providing a --resume option to briefcase package. When notarisation starts, the command to resume notarisation is output to the log.
This is very convenient for manual invocation, but not for invocation in automated environments, as it requires a different set of command line arguments to resume as it does to start the task - and it requires the user to store and remember the resume identifier.
Briefcase should be able to automatically resume a previous notarisation run without any additional command line handling.
Describe the solution you'd like
When a notarisation run starts, Briefcase should output a metadata file into the dist directory, matching the name of the file being notarized (e.g., if you're notarising Hello World-1.2.3.dmg, then Briefcase should output dist/Hello World-1.2.3.dmg.notarization-request. This should be a TOML file that contains 2 keys: the signing identity, and the resume identifier.
On subsequent runs of briefcase package, Briefcase should look for the existence of a dist/Hello World-1.2.3.dmg.notarization-request file. If this file exists, then this is a resumed package run; check that the identity listed in the file matches the identity provided at the command line; if it does, run as if --resume had been provided at the command line. If the identity doesn't match, output an error indicating the problem, and suggest that deleting the notarization-request will be required if the user wants to start a new notarisation request.
When notarisation succeeds, the .notarization-request file should be deleted from the dist folder.
Describe alternatives you've considered
Provide other ways to pass in the --resume flag, such as an environment variable. Using a marker file allows for a completely hands-off resumption.
Additional context
With this change the --resume flag can be deprecated; the existing message suggesting the use of --resume can be updated to suggest re-running briefcase package.
Any existing documentation referencing the notarisation process and the --resume flag should also be updated.
What is the problem or limitation you are having?
macOS apps must be notarized; however, the macOS notarisation workflow can take hours to complete.
Briefcase already accommodates this, providing a
--resumeoption tobriefcase package. When notarisation starts, the command to resume notarisation is output to the log.This is very convenient for manual invocation, but not for invocation in automated environments, as it requires a different set of command line arguments to resume as it does to start the task - and it requires the user to store and remember the resume identifier.
Briefcase should be able to automatically resume a previous notarisation run without any additional command line handling.
Describe the solution you'd like
When a notarisation run starts, Briefcase should output a metadata file into the
distdirectory, matching the name of the file being notarized (e.g., if you're notarisingHello World-1.2.3.dmg, then Briefcase should outputdist/Hello World-1.2.3.dmg.notarization-request. This should be a TOML file that contains 2 keys: the signing identity, and the resume identifier.On subsequent runs of
briefcase package, Briefcase should look for the existence of adist/Hello World-1.2.3.dmg.notarization-requestfile. If this file exists, then this is a resumed package run; check that the identity listed in the file matches the identity provided at the command line; if it does, run as if--resumehad been provided at the command line. If the identity doesn't match, output an error indicating the problem, and suggest that deleting thenotarization-requestwill be required if the user wants to start a new notarisation request.When notarisation succeeds, the
.notarization-requestfile should be deleted from thedistfolder.Describe alternatives you've considered
Provide other ways to pass in the
--resumeflag, such as an environment variable. Using a marker file allows for a completely hands-off resumption.Additional context
With this change the
--resumeflag can be deprecated; the existing message suggesting the use of--resumecan be updated to suggest re-runningbriefcase package.Any existing documentation referencing the notarisation process and the
--resumeflag should also be updated.