Skip to content

Commit 984f01f

Browse files
Merge pull request #42 from SwiftPackageIndex/remove-plugin
Update docs, remove plugin
2 parents 8a20b12 + 6b592dc commit 984f01f

File tree

6 files changed

+52
-88
lines changed

6 files changed

+52
-88
lines changed

Package.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,12 @@ let package = Package(
2222
products: [
2323
.executable(name: "validate-spi-manifest", targets: ["validate-spi-manifest"]),
2424
.library(name: "SPIManifest", targets: ["SPIManifest"]),
25-
.plugin(name: "SPIManifestValidatorPlugin", targets: ["ValidatorPlugin"])
2625
],
2726
dependencies: [
2827
.package(url: "https://github.com/jpsim/Yams.git", "4.0.0"..<"6.0.0"),
2928
],
3029
targets: [
3130
.executableTarget(name: "validate-spi-manifest", dependencies: ["SPIManifest"]),
32-
.plugin(
33-
name: "ValidatorPlugin",
34-
capability: .command(intent: .custom(verb: "validate-spi-manifest",
35-
description: "Validate a .spi.yml file")),
36-
dependencies: ["validate-spi-manifest"]
37-
),
3831
.target(name: "SPIManifest", dependencies: ["Yams"]),
3932
.testTarget(name: "SPIManifestTests", dependencies: ["SPIManifest"]),
4033
]

Sources/SPIManifest/Documentation.docc/CommonUseCases.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ The contents of a `.spi.yml` file allow package authors to configure their packa
44

55
The following are some common use cases.
66

7-
87
## Host DocC documentation in the Swift Package Index
98

109
Package authors can configure their package's documentation to be hosted on the Swift Package Index. In order to do so, add a `.spi.yml` file with the following content to the root of your package repository listing one or more targets you want to generate documentation for:
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Manifest Validation
2+
3+
How to validate `.spi.yml` files.
4+
5+
## Overview
6+
7+
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).
8+
9+
You can also use the `validate-spi-manifest` executable to validate your `.spi.yml` file.
10+
11+
### Online Validator
12+
13+
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.
14+
15+
The validator will display the parsed result or error messages if it fails.
16+
17+
![](online-validator.png)
18+
19+
### Validation Executable
20+
21+
#### Installation
22+
23+
You can build and install the validation executable by cloning this package and running `make install`:
24+
25+
```sh
26+
git clone https://github.com/SwiftPackageIndex/SPIManifest.git && cd SPIManifest
27+
make install
28+
```
29+
30+
This will copy the executable to `/usr/local/bin/`. To uninstall it, run
31+
32+
```sh
33+
make uninstall
34+
```
35+
36+
You can also install it using [Mint](https://swiftpackageindex.com/yonaskolb/Mint):
37+
38+
```sh
39+
mint install SwiftPackageIndex/SPIManifest
40+
```
41+
42+
#### Validation with the Executable
43+
44+
Once installed, you can run the executable with the path to an `.spi.yml` to validate it:
45+
46+
```sh
47+
❯ validate-spi-manifest ~/Projects/MyPackage/.spi.yml
48+
✅ The file is valid.
49+
```

Sources/SPIManifest/Documentation.docc/SPIManifest.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Here are some examples of things that can be configured by this file:
1818

1919
### Validation
2020

21-
This package comes with an executable to validate your `.spi.yml` for correctness. See
21+
Swift Package Index manifests can be validated for correctness via the [Online Validator](https://swiftpackageindex.com/validate-spi-manifest) or via an executable that comes with this package. See
2222

23-
- <doc:Validation>
23+
- <doc:ManifestValidation>
2424

2525
for more details.
2626

@@ -29,5 +29,6 @@ for more details.
2929
### Essentials
3030

3131
- <doc:CommonUseCases>
32+
- <doc:ManifestValidation>
3233
- <doc:Validation>
3334
- ``Manifest``

Sources/SPIManifest/Documentation.docc/Validation.md

Lines changed: 0 additions & 78 deletions
This file was deleted.
Loading

0 commit comments

Comments
 (0)