Skip to content

Commit 909a1b3

Browse files
author
Clément Le Provost
committed
Add documentation for maintainers
1 parent 7ab66aa commit 909a1b3

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

doc/maintenance.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
# Maintenance
3+
4+
*Note: This guide is intended for maintainers of this project.* If you are just using it, you don't need to read this.
5+
6+
7+
## Online and offline flavors
8+
9+
The client exists in two different flavors:
10+
11+
- The **online** flavor, which is the regular API client. Its source code is located under the `Source` directory. It
12+
gets published to Cocoapods as `AlgoliaSearch-Client-Swift`.
13+
14+
- The **offline** flavor, which is a superset of the online flavor. In addition to the main source code, it adds the
15+
`Source/offline` directory. It gets published to Cocoapods as `AlgoliaSearch-Offline-Swift`. This flavor has a
16+
dependency on the Algolia Search Offline Core module (`AlgoliaSearchOfflineCore-iOS` in Cocoapods).
17+
18+
Cocoapods subspecs don't allow us to have different deployment platforms for each subspec. So, instead of using
19+
subspecs, we use **two distinct pods**.
20+
21+
22+
23+
## Deployment process
24+
25+
- Update the **version number** in:
26+
27+
- `AlgoliaSearch-Client-Swift.podspec`
28+
29+
- `AlgoliaSearch-Offline-Swift.podspec`
30+
31+
- `Source/Info.plist` (or via Xcode, in the project settings)
32+
33+
- Update the **change log** (`ChangeLod.md`)
34+
35+
- **Dry-run the pod specs**: `pod lib lint` to check that everything's fine.
36+
37+
WARNING: Cocoapods is a very susceptible beast, and Xcode (used behind the scenes for building) add its own layer
38+
of trouble on top of it. If you get weird, inexplicable behavior, try:
39+
40+
- clearing Cocapods temporary directory (usually displayed in the error messages), which appears to be reused
41+
between two invocations of Cocoapods;
42+
43+
- clearing Xcode derived data in `~/Library/Developer/Xcode/DerivedData`.
44+
45+
NOTE: Currently, there are warnings we cannot avoid (see below).
46+
47+
- **Push to GitHub**:
48+
49+
- `git commit -m "Version X.Y.Z"`
50+
51+
- `git tag X.Y.Z`
52+
53+
- `git push --tags origin master`
54+
55+
- Make sure you have a **Cocoapods session** open: `pod trunk me`. If you have no active session, use
56+
`pod trunk register EMAIL` to create one. (If you have never registered to Cocoapods, you need to contact one of
57+
the pod's owners; `pod trunk info` is your friend.)
58+
59+
- `pod trunk push --allow-warnings`
60+
61+
NOTE: Currently, `--allow-warnings` is required. We get warnings about useless conditional compilation on iOS 8.0,
62+
but iOS 7 is really supported; it's just that it cannot be supported via Cocoapods.
63+
64+
- Edit the **release notes**: in GitHub, edit the tag and copy-paste the Change Log section for this release.

0 commit comments

Comments
 (0)