Add a pre-generated identifier to the EML
When you pre-generate a UUID or DOI, the change is not automatically reflected in the packageId
section of the EML. Use the code below to ensure that the EML lines up with the desired identifier:
## Generate DOI and add to EML
# Note that you cannot generate a DOI on test nodes
doiPid <- generateIdentifier(mn, "DOI")
doc$packageId <- doiPid
Be sure to include the identifier=
argument in your publish update command so the pre-generated identifier is applied.