Skip to content

Commit

Permalink
Merge pull request #177 from homebysix/2.0.0-prerelease-testing
Browse files Browse the repository at this point in the history
2.0.0 pre-release testing fixes
  • Loading branch information
homebysix authored Nov 3, 2020
2 parents 59ae410 + f3761ea commit 6e117fa
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. This projec
- As part of Python 3 transition, rewrote significant portions of Recipe Robot to use `curl` instead of Python's urllib. This adds flexibility and mimics AutoPkg's behavior, but may result in changes in behavior from Recipe Robot 1.x.
- New disk image build tool and layout.
- The `recipe-robot` script now supports the creation of "jss-upload" type recipes, which imports a package into Jamf Pro but does not create any policies or groups. (#153)
- Now able to build recipes for macOS screen saver (.saver) bundles.
- Recipe Robot now does more thorough pre-checking of URLs: attempts to use HTTPS instead of HTTP when possible, and tries to add a widely used user-agent if a 403 error is encountered.
- Added CodeQL scanning to GitHub repo.
- Added Sparkle shortVersionString to verbose output. (#173)
Expand Down
1 change: 1 addition & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [DropDMG](https://c-command.com/dropdmg/), with a configuration called "Recipe Robot" that has the proper layout and settings
- Xcode and command line tools
- Carthage (install using `brew install carthage`)

## Steps

Expand Down
2 changes: 1 addition & 1 deletion app/Recipe Robot/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>RRBT</string>
<key>CFBundleVersion</key>
<string>1195</string>
<string>1219</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion scripts/recipe_robot_lib/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ def inspect_pkg(input_path, args, facts):
LogLevel.VERBOSE,
4,
)
facts["codesign_authorities"] = list(codesign_authorities)
facts["codesign_authorities"] = codesign_authorities
facts["codesign_input_filename"] = os.path.basename(input_path)
else:
robo_print(
Expand Down
19 changes: 11 additions & 8 deletions scripts/recipe_robot_lib/recipe_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
# limitations under the License.


"""
recipe_generator.py
"""recipe_generator.py.
This module of Recipe Robot uses the facts collected by the main script to
create autopkg recipes for the specified app.
This module of Recipe Robot uses the facts collected by the main script
to create autopkg recipes for the specified app.
"""


Expand Down Expand Up @@ -471,12 +470,15 @@ def get_code_signature_verifier(input_path, facts):
codesigverifier.input_path = input_path
if facts.get("codesign_reqs"):
codesigverifier.requirement = facts["codesign_reqs"]
elif len(facts["codesign_authorities"]):
codesigverifier.expected_authority_names = facts["codesign_authorities"]
elif len(facts["codesign_authorities"] > 0):
codesigverifier.expected_authority_names = list(facts["codesign_authorities"])
return codesigverifier


def needs_versioner(facts):
"""Return True if we need to add a Versioner processor, based on available
facts, or False otherwise."""

download_format = facts["download_format"]
sparkle_version = facts.get("sparkle_provides_version", False)
format_needs_versioner = any(
Expand Down Expand Up @@ -744,7 +746,8 @@ def generate_munki_recipe(facts, prefs, recipe):


def get_pkgdirs(path):
"""Given a destination path, create the dictionary used for PkgRootCreator."""
"""Given a destination path, create the dictionary used for
PkgRootCreator."""
path_parts = os.path.split(path.lstrip("/"))
pkgdirs = {}
for index, dir in enumerate(path_parts):
Expand Down Expand Up @@ -1670,7 +1673,7 @@ def warn_about_appstoreapp_pyasn(facts):


def main():
"""Do nothing"""
"""Do nothing."""
pass


Expand Down
3 changes: 2 additions & 1 deletion scripts/recipe_robot_lib/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@
# Build the list of bundle types we support, and their destinations. ("app" should be listed first.)
SUPPORTED_BUNDLE_TYPES = {
"app": "/Applications",
"plugin": "/Library/Internet Plug-Ins",
"prefpane": "/Library/PreferencePanes",
"qlgenerator": "/Library/QuickLook",
"plugin": "/Library/Internet Plug-Ins",
"saver": "/Library/Screen Savers",
}

# Known Recipe Robot preference keys. All other keys will be removed from
Expand Down
19 changes: 2 additions & 17 deletions scripts/test/sample_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
- app_name: Evernote
bundle_id: com.evernote.Evernote
developer: Evernote
input_path: /Applications/Evernote.app
input_path: https://update.evernote.com/public/ENMacSMD/EvernoteMacUpdate.xml

# Sparkle feed, app in zip
- app_name: Evernote
Expand Down Expand Up @@ -273,11 +273,6 @@
developer: A51 D.O.O.
input_path: https://accounts.activecollab.com/api/v2/desktop-apps/activecollab/releases/darwin/download

- app_name: SugarSync
bundle_id: com.SugarSync.SugarSync
developer: SugarSync
input_path: https://www.sugarsync.com/downloads/InstallSugarSync.dmg

- app_name: Kite
bundle_id: com.kite.Kite
developer: MANHATTAN ENGINEERING
Expand Down Expand Up @@ -483,11 +478,6 @@
developer: Tunabelly Software
input_path: https://www.tunabellysoftware.com/resources/sparkle/silentstart.xml

- app_name: TogglDesktop
bundle_id: com.toggl.toggldesktop.TogglDesktop
developer: Apprise
input_path: https://assets.toggl.com/installers/darwin_stable_appcast.xml

- app_name: Digital Sentry
bundle_id: com.koingosw.DigitalSentry
developer: Koingo Software
Expand All @@ -513,11 +503,6 @@
developer: Robby Pahlig
input_path: https://somazonecom.ipage.com/soma-zone.com/Ammonite/a/appcast.xml

- app_name: CleanMyMac 2
bundle_id: com.macpaw.CleanMyMac2
developer: MacPaw
input_path: https://updates.devmate.com/com.macpaw.CleanMyMac2.xml

- app_name: DEVONthink Pro
bundle_id: com.devon-technologies.thinkpro2
developer: DEVONtechnologies
Expand Down Expand Up @@ -967,7 +952,7 @@
- app_name: Karabiner
bundle_id: org.pqrs.Karabiner
developer: Fumihiko Takayama
input_path: https://pqrs.org/osx/karabiner/files/appcast.xml
input_path: https://github.com/pqrs-org/Karabiner-Elements/releases/download/v13.1.0/Karabiner-Elements-13.1.0.dmg

- app_name: Vienna
bundle_id: uk.co.opencommunity.vienna2
Expand Down

0 comments on commit 6e117fa

Please sign in to comment.