Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👀 Open local pods options #32

Merged
merged 3 commits into from
Jul 8, 2021
Merged
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
22 changes: 22 additions & 0 deletions Docs/Cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ OPTIONS:
-s, --sdk <sdk> Build sdk: sim or ios. (default: sim)
-k, --keep-sources Keep Pods group in project.
-e, --exclude <exclude> Exclude pods from cache.
--include <include> Include local pods.
--focus <focus> Keep selected local pods and cache others.
--ignore-checksums Ignore already cached pods checksums.
--graph Add parents of changed pods to build process.

Expand Down Expand Up @@ -70,6 +72,26 @@ rugby --exclude Alamofire SnapKit
rugby --sdk ios
```

## Build local pods

You can include some local pods to cache:

```bash
rugby --include MyLocalPods1 MyLocalPods2
```

If you want to focus on some local pods and cache all others:

```bash
rugby --focus MyFocusedPod1 MyFocusedPod2
```

If you want to cache all local pods ([Maybe someday there will be another solution](https://github.com/apple/swift-argument-parser/pull/317)):

```bash
rugby --focus ""
```

## Ignore checksums

**Rugby** has cache file at `.rugby/cache.yml`. There keep checksums and other build settings. During each run **Rugby** try to save your time and do not pass all targets to Xcode building process. But sometimes something can get wrong.
Expand Down
2 changes: 2 additions & 0 deletions Docs/Plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ rugby example
sdk: sim
keepSources: false
exclude: []
include: []
focus: []
hideMetrics: false
ignoreChecksums: false
verbose: false
Expand Down
8 changes: 2 additions & 6 deletions Sources/Rugby/Commands/Cache/Command/CacheHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ struct Cache: ParsableCommand {
@Option(name: .shortAndLong, help: "Build sdk: sim or ios.") var sdk: SDK = .sim
@Flag(name: .shortAndLong, help: "Keep Pods group in project.") var keepSources = false
@Option(name: .shortAndLong, parsing: .upToNextOption, help: "Exclude pods from cache.") var exclude: [String] = []
@Option(name: .long,
parsing: .upToNextOption,
help: ArgumentHelp("Include local pods.", shouldDisplay: false)) var include: [String] = []
@Option(name: .long,
parsing: .upToNextOption,
help: ArgumentHelp("Keep selected pods.", shouldDisplay: false)) var focus: [String] = []
@Option(parsing: .upToNextOption, help: "Include local pods.") var include: [String] = []
@Option(parsing: .upToNextOption, help: "Keep selected local pods and cache others.") var focus: [String] = []
@Flag(inversion: .prefixedNo, help: "Build changed pods parents.") var graph = true
@Flag(help: "Ignore already cached pods checksums.\n") var ignoreChecksums = false

Expand Down
2 changes: 2 additions & 0 deletions Sources/Rugby/Commands/Plan/Subcommands/PlansExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ struct PlansExample: ParsableCommand {
#sdk: sim
#keepSources: false
#exclude: []
#include: []
#focus: []
#hideMetrics: false
#ignoreChecksums: false
#verbose: false
Expand Down