Skip to content

Commit caea535

Browse files
committed
doc: Update README with CLI setup
1 parent d405596 commit caea535

File tree

1 file changed

+44
-13
lines changed

1 file changed

+44
-13
lines changed

README.md

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -318,35 +318,66 @@ options.onActivation = { ... }
318318
let f = try createInstance(options: options)
319319
```
320320

321-
### Test runner
321+
### CLI
322322

323-
### Options
323+
To install it locally use below commands. Note, we use featurevisor-swift to avoid conflicts with other Featurevisor CLIs
324324

325325
```bash
326-
'only-failures'
326+
$ cd path/to/featurevisor-swift-sdk
327+
$ swift build -c release
328+
$ cd .build/release
329+
$ cp -f Featurevisor /usr/local/bin/featurevisor-swift
327330
```
328331

329-
If you are interested to see only the test specs that fail:
332+
Now you can usage like below:
333+
```bash
334+
$ cd path/to/featurevisor-project-with-yamls
335+
$ featurevisor-swift test .
336+
```
330337

331-
Example command:
338+
To install via Swift Package Manager, you need to add it as a dependency under your `Package.swift` file , where `X.X.X` is the version which you want to use.
332339

340+
```swift
341+
dependencies: [
342+
.package(
343+
url: "https://github.com/featurevisor/featurevisor-swift",
344+
exact: "X.X.X"
345+
)
346+
]
333347
```
348+
349+
To run use below command:
350+
351+
```bash
334352
$ swift run featurevisor test .
335353
```
336354

337-
You can also install it locally using below commands. Note, we use featurevisor-swift to avoid conflicts with other Featurevisor CLIs
355+
To update the swift's featurevisor use below command:
338356

357+
```bash
358+
$ swift package update
339359
```
340-
$ cd path/to/featurevisor-swift-sdk
341-
$ swift build -c release
342-
$ cd .build/release
343-
$ cp -f Featurevisor /usr/local/bin/featurevisor-swift
360+
361+
### Tests
362+
If you would like to test your feature/s setup against Swift SDK you can do this by invoking the below command.
363+
Currently, it takes all features which are being supported by `ios` and `tvos` and run tests for them.
364+
365+
```bash
366+
$ swift run featurevisor test .
344367
```
345368

346-
Now you can usage like below:
369+
#### Options
370+
371+
```bash
372+
'only-failures'
347373
```
348-
$ cd path/to/featurevisor-project-with-yamls
349-
$ featurevisor-swift test .
374+
375+
If you are interested to see only the test specs that fail:
376+
377+
Example command:
378+
379+
```
380+
$ swift run featurevisor test --only-failures .
350381
```
351382

352383
### Benchmarking

0 commit comments

Comments
 (0)