Build Script Notes

Notes, neat things, and gotchas about building and packaging a Go executable for the Mac App Store. This is based on the bampf project build at https://github.com/gazed/bampf/blob/master/build

Notes

Neat things

Gotchas

    # create two signed versions.  One for self distribution, one for the app store.
    signOsx('target', '"Developer ID Application: XXX"', '"Developer ID Installer: XXX"')
    signOsx('target/app', '"3rd Party Mac Developer Application: YYY"', '"3rd Party Mac Developer Installer: YYY"')

def signOsx(outdir, akey, ikey):
    subprocess.call(shlex.split('codesign -fv --entitlements src/Entitlements.plist -s '+akey+' '+outdir+'/Bampf.app'))
    subprocess.call(shlex.split('productbuild --version 1.0 --sign '+ikey+' --component '+outdir+'/Bampf.app /Applications '+outdir+'/Bampf.pkg'))

Caveats: while the script can also build a Windows executable when on a windows OS, it is not at the point where the application can be submitted to the Windows App store. Also Linux builds are stubbed at the moment.