Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
- name: Build
run: make build
env:
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_13.2.app/Contents/Developer
- name: Run tests
run: swift test
- name: Check the example project
run: cd ./ExampleProject && make swiftinfo
env:
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_13.2.app/Contents/Developer
- name: Package
run: make package
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

## master

## 2.7.0
* Build with Xcode 13.0
* Set minimal swift-tools to 5.2
* Update xcodeproj to 8.5.0
* Update swift-argument-parser to 1.0.2

## 2.3.7
* Fixed CodeCoverageProvider not working in Xcode 11

Expand Down
4 changes: 2 additions & 2 deletions Formula/swiftinfo.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class Swiftinfo < Formula
desc "📊 Extract and analyze the evolution of an iOS app's code."
homepage "https://github.com/rockbruno/SwiftInfo"
version "2.6.0"
version "2.7.0"
url "https://github.com/rockbruno/SwiftInfo/releases/download/#{version}/swiftinfo.zip"
# TODO: Try something to provide a SHA automatically

depends_on :xcode => ["12.5", :build]
depends_on :xcode => ["13.2", :build]

def install
bin.install Dir["bin/*"]
Expand Down
16 changes: 8 additions & 8 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 17 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.0
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -10,24 +10,34 @@ let package = Package(
.executable(name: "swiftinfo", targets: ["SwiftInfo"])
],
dependencies: [
.package(url: "https://github.com/tuist/xcodeproj.git", .exact("8.0.0")),
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.4.0"),
.package(url: "https://github.com/tuist/xcodeproj.git", .upToNextMinor(from: "8.7.1")),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
],
targets: [
// Csourcekitd: C modules wrapper for sourcekitd.
.target(
name: "Csourcekitd",
dependencies: []),
dependencies: []
),
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "SwiftInfoCore",
dependencies: ["Csourcekitd", "XcodeProj"]),
dependencies: [
"Csourcekitd",
.product(name: "XcodeProj", package: "xcodeproj"),
]
),
.target(
name: "SwiftInfo",
dependencies: ["SwiftInfoCore", "ArgumentParser"]),
dependencies: [
"SwiftInfoCore",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]
),
.testTarget(
name: "SwiftInfoTests",
dependencies: ["SwiftInfo"]),
dependencies: ["SwiftInfo"]
),
]
)
2 changes: 1 addition & 1 deletion Sources/SwiftInfo/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let task = Process()

struct Swiftinfo: ParsableCommand {
static var configuration = CommandConfiguration(
abstract: "Swiftinfo 2.5.1",
abstract: "Swiftinfo 2.7.0",
subcommands: []
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public struct ArchiveDurationProvider: InfoProvider {

public static let identifier: String = "archive_time"

public let description: String = "🚚 Time to Build and Archive"
public var description: String { "🚚 Time to Build and Archive" }
public let timeInt: Int

public init(timeInt: Int) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftInfoCore/Providers/CodeCoverageProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public struct CodeCoverageProvider: InfoProvider {
return URL(fileURLWithPath: "./\(tempFileName)")
}

public let description: String = "📊 Code Coverage"
public var description: String { "📊 Code Coverage" }
public let percentageInt: Int

public init(percentageInt: Int) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftInfoCore/Providers/IPASizeProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct IPASizeProvider: InfoProvider {

public static let identifier: String = "ipa_size"

public let description: String = "📦 Compressed App Size (.ipa)"
public var description: String { "📦 Compressed App Size (.ipa)" }
public let size: Int

public init(size: Int) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct LargestAssetCatalogProvider: InfoProvider {

public static let identifier: String = "largest_asset_catalog_size"

public let description: String = "🖼 Largest Asset Catalog"
public var description: String { "🖼 Largest Asset Catalog" }
public let name: String
public let size: Int

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftInfoCore/Providers/LargestAssetProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct LargestAssetProvider: InfoProvider {

public static let identifier: String = "largest_asset"

public let description: String = "📷 Largest Asset"
public var description: String { "📷 Largest Asset" }

public let name: String
public let size: Int
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftInfoCore/Providers/LinesOfCodeProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public struct LinesOfCodeProvider: InfoProvider {

public static let identifier: String = "lines_of_code"

public let description: String = "💻 Executable Lines of Code"
public var description: String { "💻 Executable Lines of Code" }
public let count: Int

public init(count: Int) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct LongestTestDurationProvider: InfoProvider {

public static let identifier: String = "longest_test_duration"

public let description: String = "⏰ Longest Test"
public var description: String { "⏰ Longest Test" }
public let name: String
public let durationInt: Int

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct OBJCFileCountProvider: InfoProvider {

public static let identifier: String = "objc_file_count"

public let description: String = "🧙‍♂️ OBJ-C .h/.m File Count"
public var description: String { "🧙‍♂️ OBJ-C .h/.m File Count" }
public let count: Int

public init(count: Int) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftInfoCore/Providers/TargetCountProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public struct TargetCountProvider: InfoProvider {

public static let identifier: String = "target_count"

public let description: String = "👶 Dependency Count"
public var description: String { "👶 Dependency Count" }
public let count: Int

public init(count: Int) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftInfoCore/Providers/TestCountProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct TestCountProvider: InfoProvider {

public static let identifier: String = "test_count"

public let description: String = "🎯 Test Count"
public var description: String { "🎯 Test Count" }
public let count: Int

public init(count: Int) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct TotalAssetCatalogsSizeProvider: InfoProvider {

public static let identifier: String = "total_asset_catalogs_size"

public let description: String = "🎨 Total Asset Catalogs Size"
public var description: String { "🎨 Total Asset Catalogs Size" }
public let size: Int

public init(size: Int) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct TotalTestDurationProvider: InfoProvider {

public static let identifier: String = "total_test_duration"

public let description: String = "🛏 Time to Build and Run Tests"
public var description: String { "🛏 Time to Build and Run Tests" }
public let durationInt: Int

public init(durationInt: Int) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftInfoCore/Providers/WarningCountProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct WarningCountProvider: InfoProvider {

public static let identifier: String = "warning_count"

public let description: String = "⚠️ Warning Count"
public var description: String { "⚠️ Warning Count" }
public let count: Int

public init(count: Int) {
Expand Down
2 changes: 1 addition & 1 deletion SwiftInfo.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'SwiftInfo'
s.module_name = 'SwiftInfo'
s.version = '2.6.0'
s.version = '2.7.0'
s.license = { type: 'MIT', file: 'LICENSE' }
s.summary = 'Extract and analyze the evolution of an iOS app\'s code.'
s.homepage = 'https://github.com/rockbruno/SwiftInfo'
Expand Down
8 changes: 4 additions & 4 deletions Tests/SwiftInfoTests/CoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final class CoreTests: XCTestCase {
"mock_provider": [
"data": [
"value": 10,
"description": "Fake provider for testing purposes"
// "description": "Fake provider for testing purposes"
],
"summary": [
"text": "Old: 5, New: 10",
Expand All @@ -54,6 +54,7 @@ final class CoreTests: XCTestCase {
]
]
]] + dataArray

expectedOutput["data"] = newDataArray
let newOutputData = api.mockFileManager.dataContents(atPath: outputPath)!
let newOutput = try! JSONSerialization.jsonObject(with: newOutputData, options: []) as! [String: Any]
Expand Down Expand Up @@ -81,7 +82,7 @@ final class CoreTests: XCTestCase {
"mock_provider": [
"data": [
"value": 10,
"description": "Fake provider for testing purposes"
// "description": "Fake provider for testing purposes"
],
"summary": [
"text": "10",
Expand All @@ -100,12 +101,11 @@ final class CoreTests: XCTestCase {
}

struct MockInfoProvider: InfoProvider {

public struct Args {}
public typealias Arguments = Args

static let identifier: String = "mock_provider"
let description: String = "Fake provider for testing purposes"
var description: String { "Fake provider for testing purposes" }
let value: Int

static func extract(fromApi api: SwiftInfo, args: Args?) throws -> MockInfoProvider {
Expand Down