-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a20b12
commit 6b592dc
Showing
6 changed files
with
52 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
Sources/SPIManifest/Documentation.docc/ManifestValidation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Manifest Validation | ||
|
||
How to validate `.spi.yml` files. | ||
|
||
## Overview | ||
|
||
The easiest way to validate a `.spi.yml` is via the [Online Validator](https://swiftpackageindex.com/validate-spi-manifest) on the [Swift Package Index website](https://swiftpackageindex.com). | ||
|
||
You can also use the `validate-spi-manifest` executable to validate your `.spi.yml` file. | ||
|
||
### Online Validator | ||
|
||
The [Online Validator](https://swiftpackageindex.com/validate-spi-manifest) is a simple web form where you can submit your sample `.spi.yml` file and it will run the exact same parser as during package processing. | ||
|
||
The validator will display the parsed result or error messages if it fails. | ||
|
||
![](online-validator.png) | ||
|
||
### Validation Executable | ||
|
||
#### Installation | ||
|
||
You can build and install the validation executable by cloning this package and running `make install`: | ||
|
||
```sh | ||
git clone https://github.com/SwiftPackageIndex/SPIManifest.git && cd SPIManifest | ||
make install | ||
``` | ||
|
||
This will copy the executable to `/usr/local/bin/`. To uninstall it, run | ||
|
||
```sh | ||
make uninstall | ||
``` | ||
|
||
You can also install it using [Mint](https://swiftpackageindex.com/yonaskolb/Mint): | ||
|
||
```sh | ||
mint install SwiftPackageIndex/SPIManifest | ||
``` | ||
|
||
#### Validation with the Executable | ||
|
||
Once installed, you can run the executable with the path to an `.spi.yml` to validate it: | ||
|
||
```sh | ||
❯ validate-spi-manifest ~/Projects/MyPackage/.spi.yml | ||
✅ The file is valid. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.