Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 2.05 KB

File metadata and controls

37 lines (23 loc) · 2.05 KB

app

In the simple case of a string argument to app, the source file is moved to the target /Applications directory. For example:

app 'Alfred 2.app'

by default moves the source to:

/Applications/Alfred 2.app

Renaming the Target

You can rename the target which appears in your /Applications directory by adding a target: key to app. Example (from scala-ide.rb):

app 'eclipse/Eclipse.app', target: 'Scala IDE.app'

target: May Contain an Absolute Path

If target: has a leading slash, it is interpreted as an absolute path. The containing directory for the absolute path will be created if it does not already exist. Example (from manopen.rb):

artifact 'openman.1', target: '/usr/local/share/man/man1/openman.1'

target: Works on Most Artifact Types

The target: key works similarly for most Cask artifacts, such as app, binary, colorpicker, dictionary, font, input_method, prefpane, qlplugin, service, suite, and artifact.

target: Should Only Be Used in Select Cases

Don’t use target: for aesthetic reasons, like removing version numbers (app "Slack #{version}.app", target: 'Slack.app'). Use it when it makes sense functionally and document your reason clearly in the Cask, using one of the templates: for clarity; for consistency; to prevent conflicts; due to developer suggestion.