From 18b212745135bbc0f10b8f0dd7e9576065504cbc Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Mon, 14 Sep 2020 14:27:06 -0500 Subject: [PATCH 1/9] added some whitespace that should fail the swiftlint github action --- Source/View Controllers/TCCProfileViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/View Controllers/TCCProfileViewController.swift b/Source/View Controllers/TCCProfileViewController.swift index 74fbd7d..57c973f 100644 --- a/Source/View Controllers/TCCProfileViewController.swift +++ b/Source/View Controllers/TCCProfileViewController.swift @@ -150,6 +150,9 @@ class TCCProfileViewController: NSViewController { } } + + + fileprivate func showAlert(_ error: LocalizedError, for window: NSWindow) { let alertWindow: NSAlert = NSAlert() alertWindow.messageText = "Operation Failed" From c076ac0ba0ce915b42e41ff7882be02b6c328af3 Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Mon, 14 Sep 2020 14:39:17 -0500 Subject: [PATCH 2/9] trying out the exact syntax from the docs --- .github/workflows/swiftlint.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index a6c601f..22ae699 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -11,7 +11,6 @@ jobs: SwiftLint: runs-on: ubuntu-latest steps: - - name: GitHub Action for SwiftLint (Only files changed in the PR) - uses: norio-nomura/action-swiftlint@3.1.0 - env: - DIFF_BASE: ${{ github.base_ref }} + - uses: actions/checkout@v1 + - name: GitHub Action for SwiftLint + uses: norio-nomura/action-swiftlint@master From 146f6d8eb8c75b60bfe170eb32c8d1035d50a1d4 Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Mon, 14 Sep 2020 14:44:33 -0500 Subject: [PATCH 3/9] added --strict to make sure the PR will fail when not resolved (hopefully) --- .github/workflows/swiftlint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index 22ae699..c905a32 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -12,5 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: GitHub Action for SwiftLint + - name: Swiftlint verification uses: norio-nomura/action-swiftlint@master + with: + args: --strict From 88319421ccab5421341c26542298c135b099b921 Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Mon, 14 Sep 2020 14:46:49 -0500 Subject: [PATCH 4/9] changed from master to 3.1.0 --- .github/workflows/swiftlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index c905a32..715b332 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -13,6 +13,6 @@ jobs: steps: - uses: actions/checkout@v1 - name: Swiftlint verification - uses: norio-nomura/action-swiftlint@master + uses: norio-nomura/action-swiftlint@3.1.0 with: args: --strict From 5b30ea2a1dbaf31053d2fda8c036c51dc626cff2 Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Mon, 14 Sep 2020 15:20:27 -0500 Subject: [PATCH 5/9] Testing out reverting the code signing to help fix the internal bulid issue --- PPPC Utility.xcodeproj/project.pbxproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/PPPC Utility.xcodeproj/project.pbxproj b/PPPC Utility.xcodeproj/project.pbxproj index c9d46a0..09e3477 100644 --- a/PPPC Utility.xcodeproj/project.pbxproj +++ b/PPPC Utility.xcodeproj/project.pbxproj @@ -612,7 +612,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "Resources/PPPC Utility.entitlements"; - CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = ""; @@ -635,7 +634,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "Resources/PPPC Utility.entitlements"; - CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = ""; From 1f5dd0f1d9943e6e46dc649d64b110e4cc35f590 Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Tue, 15 Sep 2020 08:33:28 -0500 Subject: [PATCH 6/9] removed the swiftlint warnings again now that we know the action is working --- Source/View Controllers/TCCProfileViewController.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/View Controllers/TCCProfileViewController.swift b/Source/View Controllers/TCCProfileViewController.swift index 57c973f..74fbd7d 100644 --- a/Source/View Controllers/TCCProfileViewController.swift +++ b/Source/View Controllers/TCCProfileViewController.swift @@ -150,9 +150,6 @@ class TCCProfileViewController: NSViewController { } } - - - fileprivate func showAlert(_ error: LocalizedError, for window: NSWindow) { let alertWindow: NSAlert = NSAlert() alertWindow.messageText = "Operation Failed" From f6ed3c2b3d1fdd2340de9ab8ed422deb29fe0f06 Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Tue, 15 Sep 2020 10:24:48 -0500 Subject: [PATCH 7/9] Added an alert as to go along with the print statement so that the user will at least know there was an error. --- Source/JamfProClient.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/JamfProClient.swift b/Source/JamfProClient.swift index 766defb..16dc302 100644 --- a/Source/JamfProClient.swift +++ b/Source/JamfProClient.swift @@ -80,11 +80,14 @@ struct JamfProClient { sendRequest(endpoint: "osxconfigurationprofiles", data: xml.xmlData) { (statusCode, resultData) in let success: Bool = (200 <= statusCode && statusCode <= 299) if !success { + var errMessage = "" if let text = String(data: resultData, encoding: .utf8) { - print("Error (\(statusCode)):\n\(text)") + errMessage = "Error (\(statusCode)):\n\(text)" } else { - print("Unknown error: \(statusCode)") + errMessage = "Unknown error: \(statusCode)" } + print(errMessage) + Alert().display(header: "Upload failed", message: errMessage) } completionBlock(success) } From 1d50590beb8b79c0fce804c3bac94e005eba2be9 Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Tue, 15 Sep 2020 13:25:18 -0500 Subject: [PATCH 8/9] added Jenkinsfile for internal builds and releases --- Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..1907af3 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,6 @@ +@Library(['tools', 'client-apps@1.x']) _ + +fastlane { + agent 'macos.10.15-build' + project 'PPPC Utility' +} From 11cb145872561365df56e216ae5587672e259d70 Mon Sep 17 00:00:00 2001 From: Tony Eichelberger Date: Tue, 15 Sep 2020 14:47:38 -0500 Subject: [PATCH 9/9] Removed the Jenkinsfile for now --- Jenkinsfile | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 1907af3..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,6 +0,0 @@ -@Library(['tools', 'client-apps@1.x']) _ - -fastlane { - agent 'macos.10.15-build' - project 'PPPC Utility' -}