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

Make the spec directory the default for --project argument #211

Merged
merged 1 commit into from
Dec 27, 2017
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Given a very simple project spec file like this:

```yaml
name: My Project
options:
options:
bundleIdPrefix: com.myapp
targets:
MyApp:
Expand Down Expand Up @@ -117,7 +117,7 @@ This will look for a project spec in the current directory called `project.yml`
Use `xcodegen --help` to see the list of options:

- **--spec**: An optional path to a `.yml` or `.json` project spec.
- **--project**: An optional path to a directory where the project will be generated. By default this is the current directory.
- **--project**: An optional path to a directory where the project will be generated. By default this is the directory the spec lives in.
- **--quiet**: Suppress informational and success messages. By default this is disabled.

## Editing
Expand Down
2 changes: 1 addition & 1 deletion Sources/XcodeGen/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func generate(spec: String, project: String, isQuiet: Bool, justVersion: Bool) {
}

let specPath = Path(spec).absolute()
let projectPath = Path(project).normalize()
let projectPath = project == "" ? specPath.parent() : Path(project).absolute()

if !specPath.exists {
fatalError("No project spec found at \(specPath.absolute())")
Expand Down