Skip to content

Command line tool for generating Xcode workspace with less effort

License

Notifications You must be signed in to change notification settings

kutchie-pelaez/wsgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WorkspaceGen license release

WorkspaceGen is command line tool that generates <WorkspaceName>.xcworkspace/contents.xcworkspacedata file based on workspace.yml manifest file.

This tool allows you to describe whole contents of your Xcode workspace by providing small workspace.yml configuration file.


Installing

From release (recommended)

git clone https://github.com/kulikov-ivan/wsgen wsgen
cd wsgen
git checkout release/1.0.0
swift build
cp .build/debug/wsgen /your/path/to/wsgen/somewhere/in/your/project

Homebrew (not supported yet)

brew install wsgen

Swift Package Manager

.package(url: "https://github.com/kulikov-ivan/wsgen.git", from: "1.0.0")

Usage

All you need to do is:

  • Create workspace.yml somewhere in project (root of project would be good choise)
  • Fill workspace.yml with all field you need (see Manifest Spec for more info)
  • [Recommended] copy compiled version of wsgen to your local project
  • Run following command to generate <WorkspaceName>.xcworkspacedata.xcworkspace/contents file
wsgen generate
  • [Optional] add <WorkspaceName>.xcworkspace/ to your .gitignore to keep things clear 🙂

Available Commands

wsgen generate [input_path] [output_path] [cache_name] [options]

This command will look for manifest file at provided input_path and generate <WorkspaceName>.xcworkspace folder at output_path/<WorkspaceName>.xcworkspace and output_path/<WorkspaceName>.xcworkspace/contents.xcworkspacedata file.

Arguments:

  • input_path - Path to manifest file. Default is ./workspace.yml.
  • output_path - Path to root folder of generated <WorkspaceName>.xcworkspace folder. Default is ..
  • cache_name - Name to use for caching. Cache will be located under ~/.wsgen/<cache_name>/cache Default is nil, i.e. not to use caching at all.

Options:

  • -q --quietly - Disable all logs
wsgen help

Get detailed usage information from cli.


Documentation

  • See Manifest Spec for available properties for workspace.yml manifest files

Attributions

This tool is powered by:

Inspiration for this tool came from:


Contributing

Feel free to make pull requests for any bugs, features, or documentation, they are always welcome!
To contribute to wsgen, follow these steps:

  1. Fork this repository
  2. Create a branch: git checkout -b <branch_name>
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the original branch: git push origin dev
  5. Create the pull request

License

MIT license. See LICENSE for details.