Skip to content

Commit

Permalink
Merge pull request #199 from homebysix/dev
Browse files Browse the repository at this point in the history
2.3.0 merge to main
  • Loading branch information
homebysix committed Oct 16, 2023
2 parents fc51b31 + 0a20cdc commit b1ae373
Show file tree
Hide file tree
Showing 34 changed files with 823 additions and 745 deletions.
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[flake8]
select = B,C,E,F,P,W,B9
max-line-length = 100
ignore = E127, E128, E203, E265, E266, E402, E501, E722, P207, P208, W503, F405, F403
exclude =
.git,
.hg,
max-complexity = 65
8 changes: 5 additions & 3 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[settings]
line_length = 88
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap=0
include_trailing_comma=True
line_length=88
multi_line_output=3
skip = scripts/recipe-robot, test
use_parentheses=True
60 changes: 34 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: check-added-large-files
args: [--maxkb=100]
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: mixed-line-ending
- id: no-commit-to-branch
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/python/black
rev: 19.10b0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.8.0
hooks:
- id: blacken-docs
additional_dependencies: [black>=19.10b0]
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.8.0
hooks:
- id: check-plists
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: [--maxkb=100]
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: no-commit-to-branch
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/python/black
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black>=23.9.1]
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.12.4
hooks:
- id: check-plists
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,41 @@ All notable changes to this project will be documented in this file. This projec

Nothing yet.

## [2.3.0] - 2023-10-16

### Added

- Recipe Robot is now able to create yaml recipes. To use this feature, run `--configure` and select `yaml` as the recipe format. (Or run `defaults write com.elliotjordan.recipe-robot RecipeFormat "yaml"`). The app does not yet have a method for selecting this preference.
- Now "jamf" recipes that leverage Graham Pugh's JamfPackageUploader processor can be created. This feature is currently limited to package-upload-only type recipes. (No creation of groups, policies, scripts, or other objects.) (#187)
- Redeveloped existing recipe detection using the automated AutoPkg [recipe index](https://github.com/autopkg/index). Recipe Robot will use this method until the `autopkg search` results become reliable again.
- Local `file://` URLs are now supported input paths (but be aware that these may not be desirable for providing ongoing updates via AutoPkg, unless you have automation updating the local file).
- New dedicated handler for Bare Bones update feeds, which are similar to Sparkle feeds but not the same. (#194)
- Added three more app description sources, increasing the chance that Recipe Robot will pre-fill your Munki or Jamf recipes with useful descriptions for you to customize.
- Added more post-recipe-creation affirmations, because why not.

### Fixed

- Better handling of disk images that contain packages. (#188)
- Recipe Robot better handles downloaded payloads that contain the contents of an app bundle, but lack the enclosing bundle itself. (Thanks to @andrewzierkel for #195)
- Prevented app window from expanding too much horizontally when processing extremely long filename or URL inputs.
- Fixed incorrect `[0m` that terminated script output in app.
- Fixed MacUpdate description pattern matching.
- Better handling of URLs with unquoted spaces. (#197)
- Improved detection of less obvious Sparkle feeds that might at first glance appear to be download URLs.
- More gracefully handle Sparkle and Bare Bones feeds with no usable items or enclosure URLs.

### Changed

- Recipe Robot app finally supports dark mode in script output box!
- Updated [Sparkle](https://github.com/sparkle-project/Sparkle/) framework to 2.5.1.
- If existing recipes are found, output a hint that using `--ignore-existing` can create new recipes anyway.
- Use zero-width space for script output contents placeholder, which ensures that "Processing" on the first line aligns with the left side.

### Removed

- Removed support for generation of "jss" style recipes, which leverage the deprecated [Python-JSS](https://github.com/jssimporter/python-jss) module. Please [switch to JamfUploader type recipes](https://grahamrpugh.com/2022/02/16/jssimporter-jamf-pro-api-token-auth.html) instead.
- Dropped AlternativeTo as a description source.

## [2.2.0] - 2020-12-13

### Added
Expand Down Expand Up @@ -361,7 +396,8 @@ Nothing yet.

- Initial public release of Recipe Robot (beta).

[Unreleased]: https://github.com/homebysix/recipe-robot/compare/v2.2.0...HEAD
[Unreleased]: https://github.com/homebysix/recipe-robot/compare/v2.3.0...HEAD
[2.3.0]: https://github.com/homebysix/recipe-robot/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/homebysix/recipe-robot/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/homebysix/recipe-robot/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/homebysix/recipe-robot/compare/v1.2.1...v2.0.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Recipe Robot is the easiest way to create new [AutoPkg](https://github.com/autop

For helpful information on using Recipe Robot, including tutorials and troubleshooting information, see the [wiki](https://github.com/homebysix/recipe-robot/wiki).

If you encounter a reproductible problem with Recipe Robot, I encourage you to open an [issue](https://github.com/homebysix/recipe-robot/issues) on GitHub.
If you encounter a reproducible problem with Recipe Robot, I encourage you to open an [issue](https://github.com/homebysix/recipe-robot/issues) on GitHub.

Enjoy!

Expand Down
2 changes: 1 addition & 1 deletion app/Cartfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sparkle
github "sparkle-project/Sparkle"
binary "https://sparkle-project.org/Carthage/Sparkle.json"

# AppMover (planned for future)
# github "OskarGroth/AppMover" "master"
2 changes: 1 addition & 1 deletion app/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "sparkle-project/Sparkle" "1.24.0"
binary "https://sparkle-project.org/Carthage/Sparkle.json" "2.5.1"
49 changes: 37 additions & 12 deletions app/Recipe Robot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -275,9 +275,10 @@
8B42AC761B5C5BEC0058A814 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 1220;
LastUpgradeCheck = 1500;
ORGANIZATIONNAME = "Elliot Jordan";
TargetAttributes = {
8B42AC7D1B5C5BEC0058A814 = {
Expand All @@ -288,7 +289,9 @@
};
8B42AC8D1B5C5BEC0058A814 = {
CreatedOnToolsVersion = 6.3.2;
DevelopmentTeam = 32SVX952DB;
LastSwiftMigration = 1130;
ProvisioningStyle = Automatic;
TestTargetID = 8B42AC7D1B5C5BEC0058A814;
};
};
Expand Down Expand Up @@ -353,7 +356,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Sign Sparkle again to ensure compatibility with hardened runtime\ncodesign --verbose --force --deep -o runtime --sign \"${EXPANDED_CODE_SIGN_IDENTITY_NAME}\" \"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/AutoUpdate.app\"\n";
shellScript = "# Sign Sparkle again to ensure compatibility with hardened runtime\ncodesign --verbose --force --deep -o runtime --sign \"${EXPANDED_CODE_SIGN_IDENTITY_NAME}\" \"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Contents/Frameworks/Sparkle.framework/Versions/Current/Autoupdate\"\n";
};
8BFDC44C1BF420D1003CD257 /* Run Script: Set build number to commit count */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -385,7 +388,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage outdated --xcode-warnings 2>/dev/null\n";
shellScript = "/opt/homebrew/bin/carthage outdated --xcode-warnings 2>/dev/null\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -468,7 +471,8 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "Apple Development";
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -504,7 +508,8 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "Apple Development";
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -526,15 +531,19 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1038;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 32SVX952DB;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 2.2.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 2.3.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.elliotjordan.recipe-robot";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
Expand All @@ -550,15 +559,19 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1038;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 32SVX952DB;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 2.2.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 2.3.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.elliotjordan.recipe-robot";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
Expand All @@ -569,7 +582,13 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D5416418220E96EC00A886AF /* Recipe RobotTests-Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 32SVX952DB;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
name = Debug;
Expand All @@ -578,7 +597,13 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D541641E220E96EC00A886AF /* Recipe RobotTests-Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 32SVX952DB;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
18 changes: 17 additions & 1 deletion app/Recipe Robot/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,30 @@

import AppKit
import Cocoa
import Sparkle

//import AppMover

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {

// Outlet for "Check for Updates" menu item
@IBOutlet var checkForUpdatesMenuItem: NSMenuItem!

let updaterController: SPUStandardUpdaterController

override init() {
// Check for updates using Sparkle
updaterController = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil)
}

func applicationDidFinishLaunching(_ aNotification: Notification) {
// Disabled until AppMover is implemented
// AppMover.moveIfNecessary()

// Check for updates using Sparkle
checkForUpdatesMenuItem.target = updaterController
checkForUpdatesMenuItem.action = #selector(SPUStandardUpdaterController.checkForUpdates(_:))
}

func applicationWillTerminate(aNotification: NSNotification) {
Expand All @@ -40,7 +56,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
guard
let url = URL(string: "https://github.com/homebysix/recipe-robot/blob/master/README.md")
else {
print("failed URL conversion")
print("Failed to convert Help URL.")
return
}

Expand Down
Loading

0 comments on commit b1ae373

Please sign in to comment.