-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added carthage as a dependency manager. What it does: - Adds an empty `Cartfile` - Runs `carthage update` - Adds the `copy-frameworks.sh` build phase to the project - Adds `carthage update` to `bin/setup` script
- Loading branch information
1 parent
a48f886
commit 0d0ac8c
Showing
9 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module Liftoff | ||
class Carthage < DependencyManager | ||
def setup | ||
if carthage_installed? | ||
move_cartfile | ||
else | ||
puts 'Please install Carthage or disable carthage from liftoff' | ||
end | ||
end | ||
|
||
def install | ||
if carthage_installed? | ||
run_carthage_update | ||
end | ||
end | ||
|
||
def run_script_phases | ||
[ | ||
{ | ||
"file" => "copy_frameworks.sh", | ||
"name" => "Copy framworks (Carthage)", | ||
} | ||
] | ||
end | ||
|
||
private | ||
|
||
def carthage_installed? | ||
system('which carthage > /dev/null') | ||
end | ||
|
||
def move_cartfile | ||
FileManager.new.generate('Cartfile', 'Cartfile', @config) | ||
end | ||
|
||
def run_carthage_update | ||
puts 'Running carthage update' | ||
system('carthage update') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
source 'https://rubygems.org' | ||
|
||
<% if enable_settings && dependency_manager_enabled?("cocoapods") %> | ||
gem 'cocoapods' | ||
<% end %> | ||
gem 'xcpretty' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/local/bin/carthage copy-frameworks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ build/ | |
|
||
# Cocoapods | ||
Pods | ||
Carthage | ||
|
||
# AppCode specific files | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
bundle install | ||
<% if enable_settings && dependency_manager_enabled?("cocoapods") %> | ||
pod install | ||
<% end %> | ||
<% if dependency_manager_enabled?("carthage") %> | ||
carthage update | ||
<% end %> |