From 4b855f506363f9a821e7d6bac3babef4a84dde63 Mon Sep 17 00:00:00 2001 From: fus1ondev Date: Fri, 20 Jan 2023 00:24:08 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Migrate=20tools=20f?= =?UTF-8?q?rom=20Homebrew=20to=20SwiftPM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 +- CONTRIBUTING.md | 5 -- EjectKey.xcodeproj/project.pbxproj | 71 ++++++++----------- .../xcshareddata/swiftpm/Package.resolved | 18 +++++ 4 files changed, 48 insertions(+), 52 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49f609f..a2b9550 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,10 +36,6 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Install Dependencies - run: | - brew install swiftgen - npm install --global create-dmg - name: Create Folder run: mkdir EjectKey/Generated - name: Get Version Number @@ -70,6 +66,8 @@ jobs: xcodebuild -exportArchive -archivePath "$BUILD_DIR/$XCODE_ARCHIVE" -exportPath "$BUILD_DIR" -exportOptionsPlist "$EXPORT_OPTIONS_PLIST" - name: Resign App run: codesign --force --deep -s "$CODE_SIGN_IDENTITY" "$BUILD_DIR/$APP_NAME" + - name: Install Dependency + run: npm install --global create-dmg - name: Create DMG run: create-dmg "$BUILD_DIR/$APP_NAME" continue-on-error: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5edfafb..2d65666 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,12 +22,7 @@ Please match the existing coding style as much as possible. ## Build Locally -You must have Xcode, SwiftLint and SwiftGen installed in your Mac. - -You can install SwiftLint and SwiftGen from Homebrew. - ```sh -brew install swiftgen swiftlint git clone https://github.com/fus1ondev/EjectKey.git diff --git a/EjectKey.xcodeproj/project.pbxproj b/EjectKey.xcodeproj/project.pbxproj index 0e4c337..5a2848e 100644 --- a/EjectKey.xcodeproj/project.pbxproj +++ b/EjectKey.xcodeproj/project.pbxproj @@ -231,8 +231,6 @@ isa = PBXNativeTarget; buildConfigurationList = D6288ADD289EB5DC00F80FF1 /* Build configuration list for PBXNativeTarget "EjectKey" */; buildPhases = ( - D6288AE6289EBD3A00F80FF1 /* SwiftGen */, - D6288AEB289EBF3F00F80FF1 /* SwiftLint */, D6288ACA289EB5DB00F80FF1 /* Sources */, D6288ACB289EB5DB00F80FF1 /* Frameworks */, D6288ACC289EB5DB00F80FF1 /* Resources */, @@ -241,6 +239,7 @@ buildRules = ( ); dependencies = ( + D68DAFB22979946F009062CB /* PBXTargetDependency */, D6B238D0296020560049CF72 /* PBXTargetDependency */, ); name = EjectKey; @@ -288,6 +287,8 @@ D6B238CC29601E690049CF72 /* XCRemoteSwiftPackageReference "DependencyList" */, D6EF55A72962F714002E36EC /* XCRemoteSwiftPackageReference "Sparkle" */, D637A85D2974374C00C6DD7D /* XCRemoteSwiftPackageReference "LaunchAtLogin-Modern" */, + D68DAFA929798FA7009062CB /* XCRemoteSwiftPackageReference "SwiftGenPlugin" */, + D68DAFAC297993D4009062CB /* XCRemoteSwiftPackageReference "SwiftLintPlugin" */, ); productRefGroup = D6288AC5289EB5DB00F80FF1; projectDirPath = ""; @@ -311,47 +312,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - D6288AE6289EBD3A00F80FF1 /* SwiftGen */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "$(SRCROOT)/SwiftGenInput.xcfilelist", - ); - inputPaths = ( - ); - name = SwiftGen; - outputFileListPaths = ( - "$(SRCROOT)/SwiftGenOutput.xcfilelist", - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if which swiftgen >/dev/null; then\n swiftgen\nelse\n echo \"warning: SwiftGen not installed\"\nfi\n"; - }; - D6288AEB289EBF3F00F80FF1 /* SwiftLint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = SwiftLint; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n if which swiftlint >/dev/null; then\n swiftlint\n else\n echo \"warning: SwiftLint not installed\"\n fi\nfi\n"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ D6288ACA289EB5DB00F80FF1 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -387,6 +347,10 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + D68DAFB22979946F009062CB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = D68DAFB12979946F009062CB /* SwiftLint */; + }; D6B238D0296020560049CF72 /* PBXTargetDependency */ = { isa = PBXTargetDependency; productRef = D6B238CF296020560049CF72 /* PrepareDependencyList */; @@ -647,6 +611,22 @@ kind = branch; }; }; + D68DAFA929798FA7009062CB /* XCRemoteSwiftPackageReference "SwiftGenPlugin" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SwiftGen/SwiftGenPlugin"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 6.0.0; + }; + }; + D68DAFAC297993D4009062CB /* XCRemoteSwiftPackageReference "SwiftLintPlugin" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/lukepistrol/SwiftLintPlugin"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 0.2.2; + }; + }; D6B238CC29601E690049CF72 /* XCRemoteSwiftPackageReference "DependencyList" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/Kyome22/DependencyList"; @@ -686,6 +666,11 @@ package = D637A85D2974374C00C6DD7D /* XCRemoteSwiftPackageReference "LaunchAtLogin-Modern" */; productName = LaunchAtLogin; }; + D68DAFB12979946F009062CB /* SwiftLint */ = { + isa = XCSwiftPackageProductDependency; + package = D68DAFAC297993D4009062CB /* XCRemoteSwiftPackageReference "SwiftLintPlugin" */; + productName = "plugin:SwiftLint"; + }; D6B238CD29601E690049CF72 /* DependencyList */ = { isa = XCSwiftPackageProductDependency; package = D6B238CC29601E690049CF72 /* XCRemoteSwiftPackageReference "DependencyList" */; diff --git a/EjectKey.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/EjectKey.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6ecdcb5..ae32a23 100644 --- a/EjectKey.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/EjectKey.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -62,6 +62,24 @@ "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", "version" : "1.2.0" } + }, + { + "identity" : "swiftgenplugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SwiftGen/SwiftGenPlugin", + "state" : { + "revision" : "879b85a470cacd70c19e22eb7e11a3aed66f4068", + "version" : "6.6.2" + } + }, + { + "identity" : "swiftlintplugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/lukepistrol/SwiftLintPlugin", + "state" : { + "revision" : "f69b412a765396d44dc9f4788a5b79919c1ca9e3", + "version" : "0.2.2" + } } ], "version" : 2 From a6cb233ed98ad42958a23ab9d175c8c5408bb464 Mon Sep 17 00:00:00 2001 From: fus1ondev Date: Fri, 20 Jan 2023 00:50:48 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Use=20forked=20plug?= =?UTF-8?q?-in=20for=20XcodePlugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EjectKey.xcodeproj/project.pbxproj | 26 +++++++++++++------ .../xcshareddata/swiftpm/Package.resolved | 6 ++--- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/EjectKey.xcodeproj/project.pbxproj b/EjectKey.xcodeproj/project.pbxproj index 5a2848e..ad442dd 100644 --- a/EjectKey.xcodeproj/project.pbxproj +++ b/EjectKey.xcodeproj/project.pbxproj @@ -239,6 +239,7 @@ buildRules = ( ); dependencies = ( + D68DAFBA29799C82009062CB /* PBXTargetDependency */, D68DAFB22979946F009062CB /* PBXTargetDependency */, D6B238D0296020560049CF72 /* PBXTargetDependency */, ); @@ -287,8 +288,8 @@ D6B238CC29601E690049CF72 /* XCRemoteSwiftPackageReference "DependencyList" */, D6EF55A72962F714002E36EC /* XCRemoteSwiftPackageReference "Sparkle" */, D637A85D2974374C00C6DD7D /* XCRemoteSwiftPackageReference "LaunchAtLogin-Modern" */, - D68DAFA929798FA7009062CB /* XCRemoteSwiftPackageReference "SwiftGenPlugin" */, D68DAFAC297993D4009062CB /* XCRemoteSwiftPackageReference "SwiftLintPlugin" */, + D68DAFB829799C76009062CB /* XCRemoteSwiftPackageReference "SwiftGenPlugin" */, ); productRefGroup = D6288AC5289EB5DB00F80FF1; projectDirPath = ""; @@ -351,6 +352,10 @@ isa = PBXTargetDependency; productRef = D68DAFB12979946F009062CB /* SwiftLint */; }; + D68DAFBA29799C82009062CB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = D68DAFB929799C82009062CB /* SwiftGenPlugin */; + }; D6B238D0296020560049CF72 /* PBXTargetDependency */ = { isa = PBXTargetDependency; productRef = D6B238CF296020560049CF72 /* PrepareDependencyList */; @@ -611,20 +616,20 @@ kind = branch; }; }; - D68DAFA929798FA7009062CB /* XCRemoteSwiftPackageReference "SwiftGenPlugin" */ = { + D68DAFAC297993D4009062CB /* XCRemoteSwiftPackageReference "SwiftLintPlugin" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/SwiftGen/SwiftGenPlugin"; + repositoryURL = "https://github.com/lukepistrol/SwiftLintPlugin"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 6.0.0; + minimumVersion = 0.2.2; }; }; - D68DAFAC297993D4009062CB /* XCRemoteSwiftPackageReference "SwiftLintPlugin" */ = { + D68DAFB829799C76009062CB /* XCRemoteSwiftPackageReference "SwiftGenPlugin" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/lukepistrol/SwiftLintPlugin"; + repositoryURL = "https://github.com/BookBeat/SwiftGenPlugin"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 0.2.2; + branch = "xcodeproject-support"; + kind = branch; }; }; D6B238CC29601E690049CF72 /* XCRemoteSwiftPackageReference "DependencyList" */ = { @@ -671,6 +676,11 @@ package = D68DAFAC297993D4009062CB /* XCRemoteSwiftPackageReference "SwiftLintPlugin" */; productName = "plugin:SwiftLint"; }; + D68DAFB929799C82009062CB /* SwiftGenPlugin */ = { + isa = XCSwiftPackageProductDependency; + package = D68DAFB829799C76009062CB /* XCRemoteSwiftPackageReference "SwiftGenPlugin" */; + productName = "plugin:SwiftGenPlugin"; + }; D6B238CD29601E690049CF72 /* DependencyList */ = { isa = XCSwiftPackageProductDependency; package = D6B238CC29601E690049CF72 /* XCRemoteSwiftPackageReference "DependencyList" */; diff --git a/EjectKey.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/EjectKey.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ae32a23..3044825 100644 --- a/EjectKey.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/EjectKey.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -66,10 +66,10 @@ { "identity" : "swiftgenplugin", "kind" : "remoteSourceControl", - "location" : "https://github.com/SwiftGen/SwiftGenPlugin", + "location" : "https://github.com/BookBeat/SwiftGenPlugin", "state" : { - "revision" : "879b85a470cacd70c19e22eb7e11a3aed66f4068", - "version" : "6.6.2" + "branch" : "xcodeproject-support", + "revision" : "1228d5a43ca791db0719d42f641c34a00b9c32f3" } }, {