Apple-Actions / download-provisioning-profiles

Github Action for downloading provisioning profiles from Apple AppStore Connect
MIT License
74 stars 37 forks source link

provisioning profile file extension for MAC_APP_DEVELOPMENT/MAC_APP_STORE/MAC_APP_DIRECT #9

Open OlivierLDff opened 3 years ago

OlivierLDff commented 3 years ago

I believe this is an untested bug. On the line: https://github.com/Apple-Actions/download-provisioning-profiles/blob/4360bde0e8fb288b9ea8a35fdb5ac1b7a5cc7164/src/main.ts#L34

For mac the extension for a provisioning profile should be provisionprofile not mobileprovision

I suggest something like:

function profileToExtension(type)
{
  if(type === 'MAC_APP_DEVELOPMENT' ||
     type === 'MAC_APP_STORE' ||
     type === 'MAC_APP_DIRECT')
  {
    return 'provisionprofile'
  }
  return 'mobileprovision'
}

const profileFilename = `${profile.attributes.uuid}.${profileToExtension(profile.attributes.profileType)}`

Should i PR? should i run npm run package in the same commit? in separate commit?