macOS • Linux
Workspace automates management of Swift projects.
- Provides rigorous validation:
- Generates API documentation (except from Linux). (Using Jazzy)
- Automates code maintenance:
- Automates open source details:
- Designed to interoperate with the Swift Package Manager.
- Manages projects for macOS, Linux, iOS, watchOS and tvOS.
- Configurations can be shared between projects.
(For a list of related projects, see here.)
Paste the following into a terminal to install or update
curl -sL https://gist.github.com/SDGGiesbrecht/4d76ad2f2b9c7bf9072ca1da9815d7e2/raw/update.sh | bash -s Workspace "https://github.com/SDGGiesbrecht/Workspace" 0.5.0 "workspace help" workspace arbeitsbereich
The Workspace Workflow
The Workspace project is managed by... Workspace! So let’s try it out by following along using the Workspace project itself.
When the Repository Is Cloned
Workspace hides as much as it can from Git, so when a project using Workspace is pulled, pushed, or cloned...
git clone https://github.com/SDGGiesbrecht/Workspace
...only one small piece of Workspace comes with it: A short script called “Refresh” that comes in two variants, one for each operating system.
Hmm... I wish I had more tools at my disposal... Hey! What if I...
Refresh the Workspace
To refresh the workspace, double‐click the
Refresh script for the corresponding operating system. (If you are on Linux and double‐clicking fails or opens a text file, see here.)
Refresh opens a terminal window, and in it Workspace reports its actions while it sets the project folder up for development.
This looks better. Let’s get coding!
[Add this... Remove that... Change something over here...]
...All done. I wonder if I broke anything while I was working? Hey! It looks like I can...
When the project seems ready for a push, merge, or pull request, validate the current state of the project by double‐clicking the
Validate opens a terminal window and in it Workspace runs the project through a series of checks.
When it finishes, it prints a summary of which tests passed and which tests failed.
Oops! I never realized that would happen...
Validatewhen it looks complete.
Wow! That was so much easier than doing it all manually!
Applying Workspace to a Project
To apply Workspace to a project, run the following command in the root of the project’s repository. (This requires a full install. See Installation.)
$ workspace refresh
By default, Workspace refrains from tasks which would involve modifying project files. Such tasks must be activated with a configuration file.
The Workspace project is maintained by Jeremy David Giesbrecht.
If Workspace saves you money, consider giving some of it as a donation.
If Workspace saves you time, consider devoting some of it to contributing back to the project.
Help us keep the lights on
0.5.0 - Feb 8, 2018
- “Code coverage” has been renamed “test coverage”. This affects both configuration options and inline exemptions.
- Custom Xcode projects (but not those generated by Workspace) will need their proofreading build phase script to be manually updated. (For the new script, see the documentation.)
- Documentation generation is now off by default.
initializesubcommand has been removed. Use
$ swift package initand
$ git initinstead.
- SwiftLint is no longer affected by
Disable Proofreading Rules.
- YAML resources are now embedded as
- New proofreading rules have been added.
- More tasks are available in isolation as individual subcommands. Commands marked with an asterisk (*) can be further narrowed to a specific
$ workspace normalize
$ workspace proofread
$ workspace validate build*
$ workspace test*
$ workspace validate test‐coverage*
- Documentation coverage can now be validated even if documentation generation is disabled.
- Manual execution of specific tasks from the command line is now possible even if the task is disabled in general by the configuration file.
0.4.4 - Dec 19, 2017
- Ability to deploy documentation directly from continuous integration instead of generating it locally and checking it in.
0.4.3 - Dec 18, 2017
- The default read‐me template now contains installation instructions for packages with executable products, provided the repository URL and current version are configured.
- External updates to descriptions of related projects no longer cause validation to fail.
0.4.2 - Dec 8, 2017
- JSON parsing errors no longer occur when a query to the Swift Package Manager indirectly triggers dependency resolution.
0.4.1 - Dec 6, 2017
- Documentation is no longer needlessly repeated in unrelated jobs.
- Test coverage validation reliably selects the correct target.
- Versioned workaround markers are evaluated properly.