Skip to content

Commit

Permalink
Merge pull request #62 from 417-72KI/remove-cocoapods-from-demo
Browse files Browse the repository at this point in the history
Remove CocoaPods integration from demo app
  • Loading branch information
417-72KI authored Oct 1, 2023
2 parents 2850a04 + ab8bb44 commit c6b9ef5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 65 deletions.
7 changes: 0 additions & 7 deletions Demo/Gemfile

This file was deleted.

29 changes: 0 additions & 29 deletions Demo/Podfile

This file was deleted.

6 changes: 3 additions & 3 deletions Demo/Tools/Package.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// swift-tools-version:5.5
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Tools",
platforms: [.macOS(.v11)],
platforms: [.macOS(.v12)],
products: [],
dependencies: [
.package(url: "https://github.com/yonaskolb/XcodeGen", from: "2.37.0"),
// It's too heavy to build everytime😅
// .package(url: "https://github.com/realm/SwiftLint", from: "0.47.0"),
// .package(url: "https://github.com/realm/SwiftLint", from: "0.53.0"),
],
targets: []
)
24 changes: 8 additions & 16 deletions Demo/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ options:
bundleIdPrefix: io.github.417-72KI
packages:
XCGLogger:
url: https://github.com/DaveWoodCom/XCGLogger.git
url: https://github.com/DaveWoodCom/XCGLogger
from: 7.0.1
# SwiftLint:
# url: https://github.com/realm/SwiftLint
# from: 0.53.0
targets:
BuildConfigSwiftDemo:
type: application
Expand Down Expand Up @@ -65,16 +68,10 @@ targets:
CODE_SIGN_IDENTITY: iPhone Distribution
PROVISIONING_PROFILE_SPECIFIER: ""
EXCLUDED_SOURCE_FILE_NAMES: Mock*
# buildToolPlugins:
# - plugin: SwiftLintPlugin
# package: SwiftLint
preBuildScripts:
- name: Lint
script: |
if [ "$ENABLE_PREVIEWS" == "YES" ]; then
exit 0
fi
"${SRCROOT}/../scripts/copy-lint-config.sh"
"${PODS_ROOT}/SwiftLint/swiftlint"
basedOnDependencyAnalysis: false
- name: BuildConfig.swift
script: |
if [ "$ENABLE_PREVIEWS" == "YES" ]; then
Expand All @@ -90,11 +87,7 @@ targets:
else
ENVIRONMENT='development'
fi
if [ -e ${PODS_ROOT}/BuildConfig.swift/buildconfigswift ]; then
${PODS_ROOT}/BuildConfig.swift/buildconfigswift -o ${SRCROOT}/Libs/BuildConfig_swift -e $ENVIRONMENT ${SRCROOT}/Resources/Config # For CI Run
else
xcrun -sdk macosx swift run --package-path "${SRCROOT}/.." buildconfigswift -o ${SRCROOT}/Libs/BuildConfig_swift -e $ENVIRONMENT ${SRCROOT}/Resources/Config # For Development
fi
xcrun -sdk macosx swift run --package-path "${SRCROOT}/.." buildconfigswift -o ${SRCROOT}/Libs/BuildConfig_swift -e $ENVIRONMENT ${SRCROOT}/Resources/Config # For Development
outputFiles:
- $(SRCROOT)/Libs/BuildConfig_swift/BuildConfig.generated.swift
basedOnDependencyAnalysis: false
Expand All @@ -116,7 +109,6 @@ targets:
CFBundleShortVersionString: 1.0
CFBundleVersion: 1
settings:
INFOPLIST_FILE: BuildConfigSwiftDemoTests/info.plist
TEST_HOST: $(BUILT_PRODUCTS_DIR)/BuildConfigSwiftDemo.app/BuildConfigSwiftDemo
CODE_SIGN_STYLE: Automatic
CODE_SIGN_IDENTITY: iPhone Developer
Expand Down
13 changes: 3 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,10 @@ lint:
bundle exec pod spec lint --no-clean --allow-warnings

demo_app_init:
@export POD_VERSION="$$(swift run $(executable_name) --version 2>/dev/null)" && \
@scripts/copy-lint-config.sh && \
cd Demo && \
bundle install --quiet 2>/dev/null && \
xcrun --sdk macosx swift run -c release --package-path Tools xcodegen && \
bundle exec pod install

demo_app_update:
@export POD_VERSION="$$(swift run $(executable_name) --version 2>/dev/null)" && \
cd Demo && \
bundle exec pod update
xcrun --sdk macosx swift run -c release --package-path Tools xcodegen

.PHONY: demo
demo: demo_app_init
@xed Demo/BuildConfigSwiftDemo.xcworkspace
@xed Demo/BuildConfigSwiftDemo.xcodeproj

0 comments on commit c6b9ef5

Please sign in to comment.