Skip to content

Commit

Permalink
Merge branch 'deploy/0.6.4' into productive
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Sep 1, 2019
2 parents f480812 + b886da7 commit ae4f670
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 136 deletions.
112 changes: 5 additions & 107 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
### Security
- None.

## [0.6.4] - 2019-09-01
### Fixed
- Adjusted the bundle version fallback to support both macOS and iOS frameworks
Issue: [#76](https://github.com/JamitLabs/Accio/issues/76) | PR: [#77](https://github.com/JamitLabs/Accio/pull/77) | Author: [Torsten Curdt](https://github.com/tcurdti)

## [0.6.3] - 2019-07-12
### Added
- None.
### Changed
- None.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fix mixed caching of frameworks with different Swift versions.
Issue: [#61](https://github.com/JamitLabs/Accio/issues/61) | PR: [#62](https://github.com/JamitLabs/Accio/pull/62) | Author: [Frederick Pietschmann](https://github.com/fredpi)
- Fix missing CFBundleVersion in Info.plist of build Frameworks by adding it implicity with the default value "1"
Issue: [#69](https://github.com/JamitLabs/Accio/issues/69) | PR: [#70](https://github.com/JamitLabs/Accio/pull/70) | Author: [Murat Yilmaz](https://github.com/mrylmz)
### Security
- None.

## [0.6.2] - 2019-06-20
### Added
- None.
### Changed
- None.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Redownload dependencies as a fallback when previously checked out repositories are broken.
Issue: [#27](https://github.com/JamitLabs/Accio/issues/27) | PR: [#40](https://github.com/JamitLabs/Accio/pull/40) | Author: [Frederick Pietschmann](https://github.com/fredpi)
Expand All @@ -52,26 +39,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
PR: [#59](https://github.com/JamitLabs/Accio/pull/59) | Author: [Frederick Pietschmann](https://github.com/fredpi)
- Remove duplicated processing of frameworks referenced by multiple other frameworks.
Issue: [#51](https://github.com/JamitLabs/Accio/issues/51) | PR: [#53](https://github.com/JamitLabs/Accio/pull/53) | Author: [Frederick Pietschmann](https://github.com/fredpi)
### Security
- None.

## [0.6.1] - 2019-04-26
### Added
- Adds several popular GitHub projects for official integration support testing to the Demo project.
PR: [#10](https://github.com/JamitLabs/Accio/pull/10) | Author: [Cihat Gündüz](https://github.com/Dschee)
### Changed
- None.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fixes an issue where two or more targets for the same platform would cause project linking issues.
Issue: [#29](https://github.com/JamitLabs/Accio/issues/29) | PR: [#34](https://github.com/JamitLabs/Accio/pull/34) | Author: [Murat Yilmaz](https://github.com/mrylmz)
- Fixes an issue where temporary changes to SwiftPM-only frameworks would be reset before building.
Issue: [#35](https://github.com/JamitLabs/Accio/issues/35) | PR: [#36](https://github.com/JamitLabs/Accio/pull/36) | Author: [Cihat Gündüz](https://github.com/Dschee)
### Security
- None.

## [0.6.0] - 2019-04-19
### Added
Expand All @@ -81,116 +58,51 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
### Changed
- Improves reading of supported deployment targets.
- Improves init command by treating empty manifest files like non-existing ones. Fixes [#24](https://github.com/JamitLabs/Accio/issues/24).
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fixes an issue where Accio commands where failing when Git resets failed.
- Fixes an issue where Accio didn't reset changed files untracked by Git.
### Security
- None.

## [0.5.6] - 2019-04-09
### Added
- Adds support for automatically finding schemes named like 'MBProgressHUD Framework tvOS'.
### Changed
- Some improvements that make the output information on the console more precise.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fixes the broken cleanup command of temporary frameworks after completing install.
- Fixes an issue with multiple targets linking a single framework with schemes named after their platforms.
- Fixes an issue with different platform specifiers used in scheme names.
### Security
- None.

## [0.5.5] - 2019-04-05
### Added
- None.
### Changed
- The framework copy build phase now optimizes "dirty" build timing by specifying the output files. [#13](https://github.com/JamitLabs/Accio/issues/13)
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fixes an issue where broken previous install attempt leftovers cause errors on subsequent installs. [#12](https://github.com/JamitLabs/Accio/issues/12)
### Security
- None.

## [0.5.4] - 2019-04-03
### Added
- None.
### Changed
- None.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fix symbolic linking of .framework and .dSYM files.
### Security
- None.

## [0.5.3] - 2019-04-01
### Added
- None.
### Changed
- None.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fixes an issue where recursive copies of non symbolic links could cause build errors.
### Security
- None.

## [0.5.2] - 2019-04-01
### Added
- None.
### Changed
- None.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Keep symlinks in cached ZIP files for macOS support.
### Security
- None.

## [0.5.1] - 2019-03-31
### Added
- None.
### Changed
- Check if shared cache path is available, else add new build products to local cache.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fixed an issue with copying unzipped cache build products back to project.
### Security
- None.


## [0.5.0] - 2019-03-30
### Added
- Demo project for integration testing with popular Swift frameworks.
### Changed
- Compress cached build products in a .zip file. Old style cached build products can be deleted.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Multiple issues with paths, names, symbolic links & more.
### Security
- None.

## [0.4.0] - 2019-03-29
### Added
Expand All @@ -204,30 +116,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- Unlink frameworks that are no longer included.
- Don't save build products to local cache if shared cache is available.
- Cleanup Accio run script phase when target gets removed.
### Deprecated
- None.
### Removed
- None.
### Fixed
- Fix typo in local cache logging.
- Fix missing use of `Constants.xcodeDependenciesGroup` & `Constants.dependenciesPath`.
### Security
- None.

## [0.3.0] - 2019-03-26
### Added
- None.
### Changed
- Add support for Swift 5 and Xcode 10.2.
- Separate cached frameworks by Swift tools version.
### Deprecated
- None.
### Removed
- Drop support for Swift 4.2 and Xcode <=10.1.
### Fixed
- None.
### Security
- None.

## [0.2.2]
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Formula/accio.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Accio < Formula
desc "Dependency manager driven by SwiftPM for iOS/macOS/tvOS/watchOS"
homepage "https://github.com/JamitLabs/Accio"
url "https://github.com/JamitLabs/Accio.git", :tag => "0.6.2", :revision => "b9bb6215778fccc6c4428101786b582f9217cd75"
url "https://github.com/JamitLabs/Accio.git", :tag => "0.6.3", :revision => "f480812e044486cb3ed890e67e3fd32700e7deea"
head "https://github.com/JamitLabs/Accio.git"

depends_on :xcode => ["10.2", :build]
Expand Down
6 changes: 3 additions & 3 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
"package": "XcodeProj",
"repositoryURL": "https://github.com/tuist/xcodeproj.git",
"state": {
"branch": "master",
"revision": "fca5c6b5cf6a28bae466d0a23080e94f5d8814e6",
"version": null
"branch": null,
"revision": "b951777f42e9acbfb8f19da623b43aaa604422f9",
"version": "7.0.0"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
.package(url: "https://github.com/onevcat/Rainbow.git", .upToNextMajor(from: "3.1.4")),
.package(url: "https://github.com/jakeheis/SwiftCLI.git", .upToNextMajor(from: "5.2.2")),
.package(url: "https://github.com/kareman/SwiftShell.git", .upToNextMajor(from: "4.1.2")),
.package(url: "https://github.com/tuist/xcodeproj.git", .branch("master")),
.package(url: "https://github.com/tuist/xcodeproj.git", .upToNextMajor(from: "7.0.0")),
],
targets: [
.target(
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
alt="Codebeat Badge">
</a>
<a href="https://github.com/JamitLabs/Accio/releases">
<img src="https://img.shields.io/badge/Version-0.6.3-blue.svg"
alt="Version: 0.6.3">
<img src="https://img.shields.io/badge/Version-0.6.4-blue.svg"
alt="Version: 0.6.4">
</a>
<img src="https://img.shields.io/badge/Swift-5.0-FFAC45.svg"
alt="Swift: 5.0">
Expand Down Expand Up @@ -88,6 +88,7 @@ Alternatively, read the following expandable summary:
<summary>
Summary of the Motivation & Advantages
</summary>

For developers on Apple platforms there are already well established dependency managers, namely [CocoaPods](https://github.com/CocoaPods/CocoaPods) & [Carthage](https://github.com/Carthage/Carthage). If you like how CocoaPods deals with things, you probably won't ever need to use Accio. It doesn't do anything that CocoaPods doesn't.

But if you are like the many developers who prefer to use Carthage because it's written in Swift (not Ruby) and it doesn't create an Xcode workspace but is rather unintrusive, you might find that Accio solves some of the problems you might have come across with Carthage.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Accio/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
import SwiftCLI

// MARK: - CLI
let cli = CLI(name: "accio", version: "0.6.3", description: "A dependency manager driven by SwiftPM that works for iOS/tvOS/watchOS/macOS projects.")
let cli = CLI(name: "accio", version: "0.6.4", description: "A dependency manager driven by SwiftPM that works for iOS/tvOS/watchOS/macOS projects.")

cli.commands = [InitCommand(), InstallCommand(), UpdateCommand(), CleanCommand(), ClearCacheCommand(), SetSharedCacheCommand()]
cli.globalOptions.append(contentsOf: GlobalOptions.all)
Expand Down
17 changes: 17 additions & 0 deletions Sources/AccioKit/Models/Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,21 @@ enum Platform: String, CaseIterable {
return [rawValue, "Apple Watch", "AppleWatch"]
}
}

var pathToPlist: String {
switch self {
case .iOS:
return ""

case .macOS:
return "Resources"

case .tvOS:
return ""

case .watchOS:
return ""
}
}

}
34 changes: 21 additions & 13 deletions Sources/AccioKit/Services/XcodeProjectIntegrationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ final class XcodeProjectIntegrationService {

let frameworkProduct = FrameworkProduct(frameworkDirPath: frameworkDirPath, symbolsFilePath: symbolsFilePath, commitHash: frameworkProduct.commitHash)
try frameworkProduct.cleanupRecursiveFrameworkIfNeeded()
try verifyBundleVersion(of: frameworkProduct)
try ensureBundleVersionExistence(of: frameworkProduct)

copiedFrameworkProducts.append(frameworkProduct)
}
Expand Down Expand Up @@ -243,18 +243,26 @@ final class XcodeProjectIntegrationService {
try projectFile.write(path: Path(xcodeProjectPath), override: true)
}

private func verifyBundleVersion(of product: FrameworkProduct) throws {
let plistURL = product.frameworkDirUrl.appendingPathComponent("Info.plist")
let data = try Data(contentsOf: plistURL)
var format: PropertyListSerialization.PropertyListFormat = .binary
var plist = try PropertyListSerialization.propertyList(from: data, options: [.mutableContainersAndLeaves], format: &format) as! [String: Any]

if plist["CFBundleVersion"] == nil {
print("CFBundleVersion of framework \(product.libraryName) was not specified and will be set to 1", level: .warning)
plist["CFBundleVersion"] = "1"

let data = try PropertyListSerialization.data(fromPropertyList: plist, format: format, options: 0)
try data.write(to: plistURL, options: .atomic)
private func ensureBundleVersionExistence(of product: FrameworkProduct) throws {
let plistURLs = [
product.frameworkDirUrl.appendingPathComponent("Resources").appendingPathComponent("Info.plist"),
product.frameworkDirUrl.appendingPathComponent("Info.plist"),
]
for plistURL in plistURLs {
if FileManager.default.fileExists(atPath: plistURL.path) {
let data = try Data(contentsOf: plistURL)
var format: PropertyListSerialization.PropertyListFormat = .binary
var plist = try PropertyListSerialization.propertyList(from: data, options: [.mutableContainersAndLeaves], format: &format) as! [String: Any]

// add CFBundleVersion if missing
if plist["CFBundleVersion"] == nil {
print("CFBundleVersion of framework \(product.libraryName) was not specified and will be set to 1", level: .warning)
plist["CFBundleVersion"] = "1"

let data = try PropertyListSerialization.data(fromPropertyList: plist, format: format, options: 0)
try data.write(to: plistURL, options: .atomic)
}
}
}
}
}
Loading

0 comments on commit ae4f670

Please sign in to comment.