https://github.com/reloni/carthage_cache
https://github.com/reloni/carthage_cache
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/reloni/carthage_cache
- Owner: reloni
- License: mit
- Created: 2018-02-03T10:45:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-21T15:56:29.000Z (over 8 years ago)
- Last Synced: 2025-02-27T09:57:17.267Z (over 1 year ago)
- Language: Go
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Carthage Cache [](https://travis-ci.org/buildben/carthage_cache) [](https://codebeat.co/projects/github-com-buildben-carthage_cache-master)
Community content-driven *Carthage* cache for dynamic & static binaries of your frameworks.
Each one has specifically built for your Xcode & Swift versions to speed up your day.
## Install
There're two ways: using precompiled binary or building from sources.
### Download binary (CI/CD recommended)
Paste that at a Terminal prompt:
```bash
wget https://static.buildben.io/carthage/client -O /usr/local/bin/bb_carthage_cache | chmod +x /usr/local/bin/bb_carthage_cache
```
This script will download compiled binary and place it in your path.
### Build from source
**Requirements:** Go 1.8, OSX 10.10+
1. Download source code to **$GOPATH**/src/buildben/carthage_cache/client
2. In the source folder:
```bash
GOOS=darwin GOARCH=amd64 go build -o /usr/local/bin/bb_carthage_cache cmd/carthage_cache.go | chmod +x /usr/local/bin/bb_carthage_cache
```
3. Done. Now you can use it as any other tool.
## Usage
### Dynamic linking
Run in your Cartfile.resolved location:
```bash
bb_carthage_cache
```
or if you want osx version:
```bash
bb_carthage_cache -platform mac
```
This command will download and extract binaries to Carthage/Build path:

Or build and upload to the cloud if nobody used this combination of framework & Xcode versions previously.
### Static linking
Almost the same. Run in your Cartfile.resolved location:
```bash
bb_carthage_cache -static
```
and for osx:
```bash
bb_carthage_cache -platform mac -static
```
**Warning!**
- Be sure to remove copy-frameworks step from your build steps when using static linking. Otherwise it will double your dependencies size.
- Static linking drops all resources from frameworks, keep that in mind. Dynamic & static linking together is not supported (yet)
## Support
There're a few limitations still:
- Cartfile.resolved won't be updated when you add a framework to your Cartfile. You must do it manually (yet)
- Realm static library is built without bitcode and dsym for compression purposes
- Realm static library presence is limited to Xcode ```9.1```, ```9.2``` and ```3.0.1``` or later version of Realm itself.
If you find yourself stuck upon an obstacle feel free to open an issue in any comfortable format. I check it almost every day.
## Uninstall
Maybe you would open an issue first?
But if you strongly decided to purge that evil from your property... then:
```bash
sudo rm -f /usr/local/bin/bb_carthage_cache
```
That's it. Bye-bye.
## Motivation
Leave a star if you find it useful. It hugely motivates to go on with the development.