Skip to content

Commit 677059d

Browse files
committed
Update docs and cleanup
1 parent e1f3b33 commit 677059d

4 files changed

Lines changed: 11 additions & 343 deletions

File tree

README.md

Lines changed: 10 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,16 @@
11
The `fairtool` is a cross-platform (Linux & macOS) command-line utility for
22
managing an ecosystem of apps.
33
It is powered by the Fair package, which is a zero-dependency
4-
cross-platform (Linux, macOS, & iOS) set of Swift 5.6 modules.
4+
cross-platform (Linux, macOS, & iOS) set of Swift 5 modules.
55

66
The Fair package is used to create and maintain app distribution networks such as
7-
[appfair.net](https://appfair.net), as well as the end-user applications
8-
that utilize them such as the [App Fair.app](https://appfair.app).
9-
10-
- [fairtool](#fairtool)
11-
- [Installation](#fairtool)
12-
- [Display app info](#fairtool-app-info-fileapp)
13-
- [JSON Output](#fairtool-json-output)
14-
- [Creating an App Source Catalog](#fairtool-source-create)
15-
- [Verifying an App against a Source Catalog](#fairtool-source-verify)
16-
- [Fair Swift Modules](#fair-swift-modules)
17-
- [FairCore](#faircore)
18-
- [FairApp](#fairapp)
19-
- [FairExpo](#fairexpo)
20-
- [FairKit](#fairkit)
21-
- [Swift Package Manager](#swift-package-manager)
22-
- [Roadmap](#roadmap)
7+
[appfair.org](https://appfair.org).
238

249
## fairtool
2510

2611
The functionality of the `Fair` module can best be illustrated by the
2712
capabilities of the `fairtool`, which is a command-line utility for
28-
macOS (12+) and Linux. The easiest way to get started with the
29-
utility for [Homebrew](https://brew.sh) users is to run the commands:
30-
31-
```shell
32-
% brew install fair-ground/tool/fairtool
33-
34-
==> Tapping fair-ground/tool
35-
==> Downloading https://github.com/fair-ground/Fair/releases/download/0.4.51/fai
36-
==> Installing fairtool from fair-ground/tool
37-
==> Pouring fairtool-0.4.51.arm64_monterey.bottle.tar.gz
38-
🍺 /opt/homebrew/Cellar/fairtool/0.4.51: 6 files, 10.4MB
39-
40-
% fairtool version
41-
42-
fairtool 0.4.51
43-
```
44-
45-
Alternatively, if you have a Swift 5.6 compiler installed,
46-
you can build and run from the source:
47-
48-
```shell
49-
% git clone https://github.com/fair-ground/Fair.git
50-
51-
Cloning into 'Fair'...
52-
remote: Enumerating objects: 43471, done.
53-
remote: Counting objects: 100% (4455/4455), done.
54-
remote: Compressing objects: 100% (525/525), done.
55-
remote: Total 43471 (delta 3755), reused 4454 (delta 3754), pack-reused 39016
56-
Receiving objects: 100% (43471/43471), 12.90 MiB | 13.17 MiB/s, done.
57-
Resolving deltas: 100% (39783/39783), done.
58-
59-
% cd Fair
60-
61-
% swift run fairtool version
62-
63-
Building for debugging...
64-
[61/61] Linking fairtool
65-
Build complete! (9.94s)
66-
67-
fairtool 0.4.52
68-
```
13+
macOS (15+) and Linux.
6914

7015
### fairtool artifact info _file_.app
7116

@@ -356,7 +301,6 @@ An example of the catalog output is as follows:
356301
}
357302
]
358303
}
359-
360304
```
361305

362306
#### Default properties for source create
@@ -457,7 +401,6 @@ sources of metadata.
457401
}
458402
]
459403
}
460-
461404
```
462405

463406

@@ -510,24 +453,6 @@ would look like:
510453
]
511454
```
512455

513-
514-
#### App Source Catalog
515-
516-
The format of the catalog and the meaning of the various properties is described
517-
at [https://appfair.net/#app-source-catalog](https://appfair.net/#app-source-catalog).
518-
519-
520-
### fairtool online
521-
522-
An experimental web service with a subset of the
523-
fairtool's functionality is available at:
524-
[https://fairtool.herokuapp.com](https://fairtool.herokuapp.com).
525-
526-
This service can be used to inspect the properties of `.app` `.zip` and `.ipa`
527-
URLs online, as well as generate default catalog entries for
528-
application artifacts.
529-
530-
531456
## Fair Swift Modules
532457

533458
The `fairtool` is powered by the `Fair` package, which is a
@@ -546,22 +471,6 @@ FairCore also contains utilities for
546471
and
547472
[XML parsing](https://fair-ground.github.io/Fair/documentation/faircore/xmlnode).
548473

549-
See the [documentation for FairCore](https://fair-ground.github.io/Fair/documentation/faircore/).
550-
551-
### FairApp
552-
553-
The `FairApp` module contains the necessary functionality for
554-
building and distributing an app on a fair ground such as
555-
[appfair.net](https://appfair.net). `FairApp` depends on `FairCore`.
556-
557-
Important types are
558-
[AppCatalog](https://fair-ground.github.io/Fair/documentation/fairapp/appcatalog),
559-
which is a serialized form of the [App Source Catalog](#app-source-catalog) format,
560-
[AppBundle](https://fair-ground.github.io/Fair/documentation/fairapp/appbundle),
561-
which is an abstraction of the packing of an iOS or macOS app.
562-
563-
See the [documentation for FairApp](https://fair-ground.github.io/Fair/documentation/fairapp/).
564-
565474
### FairExpo
566475

567476
The `FairExpo` module provides a cross-platform set of networking
@@ -572,55 +481,32 @@ getting metadata from the
572481
and creating and verifying App Source catalogs with the
573482
[https://fair-ground.github.io/Fair/documentation/fairexpo/appcatalogapi](AppCatalogAPI).
574483

575-
`FairExpo` depends on `FairApp`.
484+
`FairExpo` depends on `FairCore`.
576485

577-
See the [documentation for FairExpo](https://fair-ground.github.io/Fair/documentation/fairexpo/).
578-
579-
### FairKit
580-
581-
The `FairKit` module contains optional SwiftUI Views and enhancements,
582-
such as a SwiftUI [WebView](https://fair-ground.github.io/Fair/documentation/fairkit/webview).
583-
584-
`FairKit` depends on `FairApp`.
585-
586-
See the [documentation for FairKit](https://fair-ground.github.io/Fair/documentation/fairkit/).
587-
588-
589486
## Swift Package Manager
590487

591488
In order to add the Fair module to an existing package named "App",
592489

593490

594491
```swift
595-
// swift-tools-version: 5.6
596-
// The swift-tools-version declares the minimum version of Swift required to build this package.
597-
492+
// swift-tools-version: 5.10
598493
import PackageDescription
599494

600495
let package = Package(
601496
name: "App",
602-
platforms: [ .macOS(.v12), .iOS(.v15) ],
497+
platforms: [ .macOS(.v15), .iOS(.v17) ],
603498
products: [
604-
// Products define the executables and libraries a package produces, and make them visible to other packages.
605-
.library(
606-
name: "App",
607-
targets: ["App"]),
499+
.library(name: "App", targets: ["App"]),
608500
],
609501
dependencies: [
610-
// Dependencies declare other packages that this package depends on.
611-
// .package(url: /* package url */, from: "1.0.0"),
612-
.package(url: "https://github.com/fair-ground/Fair", from: "0.5.0"),
502+
.package(url: "https://github.com/appfair/Fair", "0.9.0"..<"2.0.0"),
613503
],
614504
targets: [
615505
.target(name: "App", dependencies: [
616-
// platform-native support for Fair apps (macOS, iOS, Linux)
617-
.product(name: "FairApp", package: "Fair"),
618-
// low-level data structures and utilities (macOS, iOS, Linux)
506+
// low-level data structures and utilities
619507
.product(name: "FairCore", package: "Fair"),
620-
// optional networking utilities (macOS, iOS, Linux)
508+
// optional catalog utilities
621509
.product(name: "FairExpo", package: "Fair"),
622-
// optional SwiftUI enhancements (macOS, iOS)
623-
.product(name: "FairKit", package: "Fair"),
624510
]),
625511
.testTarget(name: "AppTests", dependencies: ["App"]),
626512
]

Sources/fairtool/Documentation.docc/Documentation.md

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

Tests/FairExpoTests/FairHubTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ final class FairHubTests: XCTestCase {
126126

127127
func testFetchCommitQuery() async throws {
128128
let hub = try Self.hub(skipNoAuth: true)
129-
let response = try await hub.request(FairHub.GetCommitQuery(owner: "fair-ground", name: "Fair", ref: "93d86ba5884772c8ef189bead1ca131bb11b90f2")).get().data
129+
let response = try await hub.request(FairHub.GetCommitQuery(owner: "appfair", name: "Fair", ref: "93d86ba5884772c8ef189bead1ca131bb11b90f2")).get().data
130130

131131
guard let sig = response.repository.object.signature else {
132132
return XCTFail("no signature in response")

0 commit comments

Comments
 (0)