Skip to content

Commit

Permalink
Fix issue where on-demand cleanup wasn't happening. Added cleanup of …
Browse files Browse the repository at this point in the history
…the cleanup trigger to the cleanup logic (yo dawg)

Also tidied up some of the SwiftLint stuff and moved disabled rules to the `.swiftlint.yml` file
  • Loading branch information
bartreardon committed Aug 30, 2023
1 parent 403a949 commit 9ebcd3b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
disabled_rules: # rule identifiers turned on by default to exclude from running
- line_length
- function_body_length
- cyclomatic_complexity
- large_tuple

excluded: # paths to ignore during linting. Takes precedence over `included`.
- ./build/SourcePackages/checkouts/swift-argument-parser/*
4 changes: 2 additions & 2 deletions Outset.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 4.0.1;
MARKETING_VERSION = 4.0.5;
PRODUCT_BUNDLE_IDENTIFIER = io.macadmins.Outset;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -505,7 +505,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 4.0.1;
MARKETING_VERSION = 4.0.5;
PRODUCT_BUNDLE_IDENTIFIER = io.macadmins.Outset;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
1 change: 0 additions & 1 deletion Outset/Functions/FileUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//
// Created by Bart Reardon on 3/12/2022.
//
// swiftlint:disable large_tuple line_length function_body_length

import Foundation
import CommonCrypto
Expand Down
1 change: 0 additions & 1 deletion Outset/Functions/Processing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//
// Created by Bart Reardon on 3/12/2022.
//
// swiftlint:disable function_body_length cyclomatic_complexity

import Foundation

Expand Down
1 change: 0 additions & 1 deletion Outset/Functions/Services.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//
// Created by Bart Reardon on 21/3/2023.
//
// swiftlint:disable line_length

import Foundation
import ServiceManagement
Expand Down
1 change: 0 additions & 1 deletion Outset/Functions/SystemUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//
// Created by Bart Reardon on 1/12/2022.
//
// swiftlint:disable line_length

import Foundation
import SystemConfiguration
Expand Down
10 changes: 3 additions & 7 deletions Outset/Outset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//
// swift implementation of outset by Joseph Chilcote https://github.com/chilcote/outset
//
// swiftlint:disable line_length function_body_length cyclomatic_complexity

import Foundation
import ArgumentParser
Expand Down Expand Up @@ -249,12 +248,9 @@ struct Outset: ParsableCommand {

if cleanup {
writeLog("Cleaning up on-demand directory.", logLevel: .debug)
if checkFileExists(path: onDemandTrigger) {
pathCleanup(pathname: onDemandTrigger)
}
if !folderContents(path: onDemandDir).isEmpty {
pathCleanup(pathname: onDemandDir)
}
if checkFileExists(path: onDemandTrigger) { pathCleanup(pathname: onDemandTrigger) }
if checkFileExists(path: cleanupTrigger) { pathCleanup(pathname: cleanupTrigger) }
if !folderContents(path: onDemandDir).isEmpty { pathCleanup(pathname: onDemandDir) }
}

if !addIgnoredUser.isEmpty {
Expand Down

0 comments on commit 9ebcd3b

Please sign in to comment.