-
Notifications
You must be signed in to change notification settings - Fork 17
/
Template.ds.recipe
80 lines (78 loc) · 3.55 KB
/
Template.ds.recipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?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>Description</key>
<!-- Use this template to take any parent .pkg recipe and copy the package that it generates
(or extracts) to a local path of your choosing. The .ds family of recipes were developed
with users of DeployStudio in mind so that you could copy a generated .pkg to the Packages folder
inside your DeployStudio repository and set a name of your choosing that would be constant —
by keeping the package name the same, your DeployStudio workflows would not care that the package
contents may have changed, hence the default choice of using the app name for the package name.
It should be noted, however, that you can use .ds recipes to simply add a copy operation to
the end of any suitable recipe chain. You could use this for any packages you might want to
deploy with MDS (MacDeployStick), for example.
Because this has the power to (and is designed to) overwrite items in a deployment repo, it is
strongly recommended that parent recipes called by this template are well-vetted, particularly
through the use of Code Signature Verification (CodeSignatureVerifier processor) and by running
with Trust Info verification set to block recipes that fail verification (for details, see
https://github.com/autopkg/autopkg/wiki/AutoPkg-and-recipe-parent-trust-info).
Use of this template:
You need to change ____ (to the core recipe name), yourgithubusername in the recipe Identifier,
and parentgithubusername in the ParentRecipe author.
Alternative .ds Recipe Development:
Recipe Robot has incorporated this template into its recipe generator:
https://github.com/homebysix/recipe-robot -->
<string>Downloads the latest version of ____, packages it, and then copies the package to
a local path of your choosing.
Input keys:
- DS_PKGS_PATH is the destination path for the copy. A trailing slash is not required/desired.
The path does not need to be on the same volume as the cache; just start with /Volumes/volumename.
- DS_NAME is what the final package will be called, regardless of what was generated by the parent recipe.
It defaults to %NAME% (just the app name).
</string>
<key>Identifier</key>
<string>com.github.yourgithubusername.ds.____</string>
<key>Input</key>
<dict>
<key>DS_NAME</key>
<string>%NAME%</string>
<key>DS_PKGS_PATH</key>
<string>/Users/Shared/Deploy/Packages</string>
</dict>
<key>MinimumVersion</key>
<string>1.0.0</string>
<key>ParentRecipe</key>
<string>com.github.parentgithubusername.pkg.____</string>
<key>Process</key>
<array>
<dict>
<key>Processor</key>
<string>StopProcessingIf</string>
<key>Arguments</key>
<dict>
<key>predicate</key>
<!-- Depending on the processor in the parent recipe, either download_changed (returned by URLDownloader)
or new_package_request (returned by PkgCreator and AppPkgCreator) will be used to the left of the ==. -->
<string>new_package_request == FALSE</string>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>Copier</string>
<key>Arguments</key>
<dict>
<key>destination_path</key>
<string>%DS_PKGS_PATH%/%DS_NAME%.pkg</string>
<key>overwrite</key>
<true/>
<key>source_path</key>
<!-- If you created the pkg using [App]PkgCreator, use %pkg_path% for the source_path.
If you extracted an existing pkg (e.g., using Unarchiver), the conventional source_path
would be %RECIPE_CACHE_DIR%/%NAME%/*.pkg -->
<string>%pkg_path%</string>
</dict>
</dict>
</array>
</dict>
</plist>