Skip to content

Release MacOS DMG file with compressed SecretlessBroker.app #1348

@infamousjoeg

Description

@infamousjoeg

Is your feature request related to a problem? Please describe.

It is not related to a problem.

Describe the solution you would like

Currently, every release includes a Go executable where GOOS_ARCH is set to darwin. This generates a single executable.

In addition to that, I am proposing that a MacOS compressed DMG file is also released that contains SecretlessBroker.app in agent-mode for easy install and use on MacOS.

See Additional context below for how this can be accomplished.

Describe alternatives you have considered

n/a

Additional context

╰ tree SecretlessBroker.app
SecretlessBroker.app
└── Contents
    ├── Info.plist
    ├── MacOS
    │   └── secretless-broker
    └── Resources
        └── icon.icns

3 directories, 3 files
  1. mkdir SecretlessBroker.app
  2. Within SecretlessBroker.app:
  • touch Info.plist
  • mkdir MacOS
  • mkdir Resources
  1. Within Info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleExecutable</key>
	<string>secretless-broker</string>
	<key>CFBundleIconFile</key>
	<string>icon.icns</string>
	<key>CFBundleIdentifier</key>
	<string>com.cyberark.secretless</string>
	<key>NSHighResolutionCapable</key>
	<true/>
	<key>LSUIElement</key>
	<true/>
</dict>
</plist>
  • CFBundleExecutable is the name of the executable under SecretlessBroker.app/MacOS.
  • CFBundleIdentifier is the identifier of the .app when it is running.
  • LSUIElement set to true sets "agent-mode" so when SecretlessBroker.app is running, it doesn't constantly bounce in the dock menu.
  1. Within the MacOS directory, add the secretless_broker executable for Darwin from go build.
  2. Within the Resources directory, add the icon set for SecretlessBroker.app icons in @1x and @2x sizes.

To create the DMG file and compress it, follow the rest of the documentation on this blog post: https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5. At the end of the blog post, there is a script that automates this entire process.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions