Skip to content

Commit f279449

Browse files
authored
Merge pull request #32 from Five3Apps/22-docc-ci
CI: Build DocC catalog on every PR (#22)
2 parents 405e4fe + 7a7e60e commit f279449

3 files changed

Lines changed: 51 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
concurrency:
9+
group: ci-${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
docc:
14+
name: DocC catalog
15+
runs-on: macos-15
16+
timeout-minutes: 30
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Select Xcode
21+
run: |
22+
if [ ! -d /Applications/Xcode_16.4.app ]; then
23+
echo "Xcode 16.4 not found. Installed Xcode versions:"
24+
ls /Applications | grep Xcode || true
25+
exit 1
26+
fi
27+
sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
28+
29+
- name: Verify Swift version
30+
run: swift --version
31+
32+
- name: Build DocC catalog
33+
run: |
34+
swift package --allow-writing-to-directory ./docc-output \
35+
generate-documentation --target ReliaBLE --warnings-as-errors \
36+
--output-path ./docc-output
37+
38+
- name: Archive DocC output
39+
run: ditto -c -k --sequesterRsrc --keepParent docc-output ReliaBLE-docs.zip
40+
41+
- name: Upload DocC archive
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: ReliaBLE-docs
45+
path: ReliaBLE-docs.zip
46+
if-no-files-found: error

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Packages/
3333
.swiftpm
3434

3535
.build/
36+
docc-output/
3637
DerivedData/
3738

3839
# CocoaPods

Sources/ReliaBLE/Models/Peripheral.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ public class Peripheral: Identifiable, Hashable {
6666
/// The timestamp when the peripheral was last seen
6767
public internal(set) var lastSeen: Date?
6868

69-
/// Create a peripheral with a unique identifier and optional CoreBluetooth peripheral data. The integrating app
70-
/// should use this initializer to create a `Peripheral` instance when it has a unique identifier for a peripheral
71-
/// but has not yet discovered the peripheral with CoreBluetooth. The ``PeripheralManager`` will update the instance
72-
/// with CoreBluetooth data when the peripheral is discovered.
69+
/// Creates a peripheral with a unique identifier and optional CoreBluetooth discovery data.
70+
///
71+
/// Prefer observing ``ReliaBLEManager/discoveredPeripherals`` for devices discovered during scanning.
72+
/// ReliaBLE updates only the ``Peripheral`` instances it manages internally and emits through that publisher.
7373
/// - Parameters:
7474
/// - id: Unique identifier for the peripheral as set by the integrating app.
7575
/// - peripheral: Reference to the CoreBluetooth `CBPeripheral` object

0 commit comments

Comments
 (0)