Skip to content

Commit b7715c6

Browse files
Merge pull request #61 from jamf/Bug-fixes-for-1.5.0
Fixed a couple of items that were low hanging fruit
2 parents 923fe7c + 32c7412 commit b7715c6

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [1.5.0] - 2025-1-29
88
### Features
9-
- Changed the prompt for password for a file share to also include the username so it's possible to change it from what Jamf Pro uses. It will save the last username that was used successfully.
10-
- Added the option in settings to restrict deletions after synchronization and manual deletions either entirely or to allow only deleting files or allowing deletion of both files and packages.
11-
- Added a --dryRun command line flag so you can see what will be copied and deleted without actually doing anything, and also added a dry run checkbox to the main view.
12-
- Added a view where Jamf Pro servers can be activated or deactivated, and added a setting to have it display at startup before it reads any data from the servers. By limiting the number of active servers, startup time can be greatly reduced.
9+
- Added the option in settings to restrict deletions after synchronization and manual deletions either entirely or to allow only deleting files or allowing deletion of both files and packages. (Issue #42)
10+
- Changed the prompt for password for a file share to also include the username so it's possible to change it from what Jamf Pro uses. It will save the last username that was used successfully. (Potential fix for issue #48 and #49)
11+
- Added a --dryRun command line flag so you can see what will be copied and deleted without actually doing anything, and also added a dry run checkbox to the main view. (Issue #51)
12+
- Added a view where Jamf Pro servers can be activated or deactivated, and added a setting to have it display at startup before it reads any data from the servers. By limiting the number of active servers, startup time can be greatly reduced. (Issue #55)
13+
- Made it so you can upload zip files when clicking the + button for a distribution point. (Issue #59)
14+
### Bug fixes
15+
- Made it unmount file shares after command line processing is completed. (Issue #50)
1316

1417
## [1.4.0] - 2024-10-25
1518
### Features

Jamf Sync.xcodeproj/xcshareddata/xcschemes/Jamf Sync.xcscheme

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,17 @@
7979
isEnabled = "NO">
8080
</CommandLineArgument>
8181
<CommandLineArgument
82-
argument = "&quot;Demo Folder 2&quot;"
82+
argument = "&quot;Demo folder 1&quot;"
8383
isEnabled = "NO">
8484
</CommandLineArgument>
8585
<CommandLineArgument
8686
argument = "-d"
8787
isEnabled = "NO">
8888
</CommandLineArgument>
89+
<CommandLineArgument
90+
argument = "StrandlandM1:HarryTest"
91+
isEnabled = "NO">
92+
</CommandLineArgument>
8993
<CommandLineArgument
9094
argument = "Cloud:HarryTest"
9195
isEnabled = "NO">

JamfSync/Model/DataModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class DataModel: ObservableObject {
4848
private var updateListViewModelsTask: Task<Void, Error>?
4949
private var updateChecksumsTask: Task<Void, Error>?
5050

51-
func load(dataPersistence: DataPersistence) {
51+
func load(dataPersistence: DataPersistence, isProcessingCommandLine: Bool = false) {
5252
savableItems = dataPersistence.loadSavableItems()
53-
if firstLoad && !promptedForJamfProInstances && settingsViewModel.promptForJamfProInstances {
53+
if firstLoad && !promptedForJamfProInstances && settingsViewModel.promptForJamfProInstances && !isProcessingCommandLine {
5454
shouldPresentServerSelectionSheet = true
5555
promptedForJamfProInstances = true
5656
} else {

JamfSync/UI/JamfSyncApp.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ struct JamfSyncApp: App {
8383

8484
if argumentParser.someArgumentsPassed {
8585
let commandLineProcessing = CommandLineProcessing(dataModel: DataModel.shared, dataPersistence: dataPersistence)
86-
if commandLineProcessing.process(argumentParser: argumentParser) {
86+
let succeeded = commandLineProcessing.process(argumentParser: argumentParser)
87+
appDelegate.cleanup()
88+
if succeeded {
8789
exit(0)
8890
} else {
8991
exit(1)

JamfSync/UI/PackageListView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct PackageListView: View {
105105
Button {
106106
let panel = NSOpenPanel()
107107
panel.allowsMultipleSelection = true
108-
panel.allowedFileTypes = ["pkg", "dmg", "mpkg"]
108+
panel.allowedFileTypes = ["pkg", "dmg", "mpkg", "zip"]
109109
panel.canChooseDirectories = false
110110
panel.canChooseFiles = true
111111
if panel.runModal() == .OK {

JamfSync/Utility/CommandLineProcessing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CommandLineProcessing {
2121

2222
print("Loading distribution points")
2323
dataModel.loadingInProgressGroup = DispatchGroup()
24-
dataModel.load(dataPersistence: dataPersistence)
24+
dataModel.load(dataPersistence: dataPersistence, isProcessingCommandLine: true)
2525
dataModel.loadingInProgressGroup?.wait()
2626

2727
guard let srcDp = dataModel.findDpByCombinedName(name: srcDpName) else {

0 commit comments

Comments
 (0)