# Creating a DevMate build.

Modify the build number and version number of *only* the main Day One app by appending
a letter. (Thus, you might export version 2.3.1a, build 252a). This indicates to DevMate
that the build is a beta build. 

Archive a Release_DevID version of the app.

Export the app from archive and a Developer ID signed app.

  NOTE:

  You will probably get an error that certain bundle identifiers could not be registered for
  inclusion in the provisioning profile. At this point, you need to temporarily modify the
  Info.plist files for a few embedded tools within DevMateKit.framework.

  Right-click on the archive, choose "Show in Finder". Then go into the archive and find the
  archived Day One.app/Contents/Frameworks/DevMateKit.framework. Within that framework, find
  the following files and open them in a text editor:

    <path_to_devmate>/Resources/Autoupdate.app/Contents/Info.plist
    <path_to_devmate>/Resources/Problem Reporter.app/Contents/Info.plist
    <path_to_devmate>/Resources/Problem Reporter Sandboxed.app/Contents/Info.plist
    <path_to_devmate>/XPCServices/com.devmate.UpdateInstaller.xpc/Contents/Info.plist

  In each of these files, find the "CFBundleIdentifier" key. Prefix the value with
  "com.bloombuilt.". Thus, "com.devmate.Problem-Reporter" would become
  "com.bloombuilt.com.devmate.Problem-Reporter"

  After you have modified all four of those files, go back to the Xcode archive view again and
  attempt to export again as before. As soon as it gets past the code signing step, cancel the
  archive process. Then go back to each of those Info.plist files and revert them back to their
  original values.

  After reverting them to their original values, you may now once again export. This time, it
  should succeed without errors.


Install appdmg utility:

npm install -g appdmg

Then execute:

cd .../PathToArchiveExportFolder/
.../PathTo/createdmg.js

The result will be put into current working directory in a `Day One.dmg` file created from app path.
You can pass in app path via first argument for createdmg.js, or if not provided it defaults to
the current working directory's "Day One.app"

