11// swift-tools-version:5.10
22
33import PackageDescription
4+ import Foundation
45
56let package = Package (
67 name: " CoreDataRepository " ,
@@ -20,10 +21,6 @@ let package = Package(
2021 ) ,
2122 ] ,
2223 dependencies: [
23- . package (
24- url: " https://github.com/ordo-one/package-benchmark.git " ,
25- from: " 1.23.5 "
26- ) ,
2724 . package (
2825 url: " https://github.com/pointfreeco/swift-custom-dump.git " ,
2926 from: " 1.0.0 "
@@ -66,18 +63,27 @@ extension [SwiftSetting] {
6663 ]
6764}
6865
69- // Benchmark of coredata-repository-benchmarks
70- package . targets += [
71- . executableTarget(
72- name: " coredata-repository-benchmarks " ,
73- dependencies: [
74- . product( name: " Benchmark " , package : " package-benchmark " ) ,
75- " CoreDataRepository " ,
76- " Internal " ,
77- ] ,
78- path: " Benchmarks/coredata-repository-benchmarks " ,
79- plugins: [
80- . plugin( name: " BenchmarkPlugin " , package : " package-benchmark " ) ,
81- ]
82- ) ,
83- ]
66+ if [ " YES " , " TRUE " ] . contains ( ( ProcessInfo . processInfo. environment [ " BENCHMARKS " ] ) ? . uppercased ( ) ) {
67+ package . dependencies += [
68+ . package (
69+ url: " https://github.com/ordo-one/package-benchmark.git " ,
70+ from: " 1.23.5 "
71+ ) ,
72+ ]
73+
74+ // Benchmark of coredata-repository-benchmarks
75+ package . targets += [
76+ . executableTarget(
77+ name: " coredata-repository-benchmarks " ,
78+ dependencies: [
79+ . product( name: " Benchmark " , package : " package-benchmark " ) ,
80+ " CoreDataRepository " ,
81+ " Internal " ,
82+ ] ,
83+ path: " Benchmarks/coredata-repository-benchmarks " ,
84+ plugins: [
85+ . plugin( name: " BenchmarkPlugin " , package : " package-benchmark " ) ,
86+ ]
87+ ) ,
88+ ]
89+ }
0 commit comments