Skip to content

Commit 63e3cb6

Browse files
authored
Add quick instructions for building the Zip. (#2819)
Added some instructions to build the zip. Will expand further with releasing information.
1 parent 00feaca commit 63e3cb6

File tree

1 file changed

+68
-1
lines changed

1 file changed

+68
-1
lines changed

ZipBuilder/README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,74 @@
11
# Firebase Zip File Builder
22

33
This project builds the Firebase iOS Zip file for distribution.
4-
More instructions to come.
4+
5+
## Overview
6+
7+
This is a small Swift Package Manager project that allows users to package a Firebase iOS Zip file. With no launch
8+
arguments, it will use the most recent public versions of all SDKs included in the zip file.
9+
10+
It was designed to fail fast with an explanation of what went wrong, so you can fix issues or dig in without having to dig
11+
too deep into the code.
12+
13+
## Requirements
14+
15+
In order to build the Zip file, you will need:
16+
17+
- Xcode 10.1
18+
- CocoaPods
19+
- An internet connection to fetch CocoaPods
20+
21+
## Running the Tool
22+
23+
You can run the tool with `swift run ZipBuilder [ARGS]` or generate an Xcode project with
24+
`swift package generate-xcodeproj` and run within Xcode.
25+
26+
In the near future, releases will be built via a builder server instead of on the release engineer's machine, making these
27+
instructions more of a reference to understand what's going on instead of how to build it yourself.
28+
29+
## Launch Arguments
30+
31+
See `main.swift` and the `LaunchArgs` struct for information on specific launch arguments.
32+
33+
You can pass in launch arguments with Xcode by clicking "ZipBuilder" beside the Run/Stop buttons, clicking "Edit
34+
Scheme" and adding them in the "Arguments Passed On Launch" section.
35+
36+
### Common Arguments
37+
38+
These arguments assume you're running the command from the `ZipBuilder` directory.
39+
40+
**Required** arguments:
41+
- `-templateDir $(pwd)/Template`
42+
- This should always be the same.
43+
- `-coreDiagnosticsDir <PATH_TO_FirebaseCoreDiagnostics.framework>`
44+
- Needed to overwrite the existing Core Diagnostics framework.
45+
46+
Optional comon arguments:
47+
- `-updatePodRepo false`
48+
- This is for speedups when `pod repo update` has already been run recently.
49+
50+
For release engineers (Googlers packaging an upcoming Firebase release) these commands should also be used:
51+
- `-customSpecRepos sso://cpdc-internal/firebase`
52+
- This pulls the latest podspecs from the CocoaPods staging area.
53+
- `-releasingSDKs <PATH_TO_current.textproto>` and
54+
- `-existingVersions <PATH_TO_all_firebase_ios_sdks.textproto>`
55+
- Validates the version numbers fetched from CocoaPods staging against the expected released versions from these
56+
textprotos.
57+
58+
Putting them all together, here's a common command to build a releaseable Zip file:
59+
60+
```
61+
swift run ZipBuilder -templateDir $(pwd)/Template -updatePodRepo false \
62+
-coreDiagnosticsDir /private/tmp/tmpUqBxKN/FirebaseCoreDiagnostics.framework \
63+
-releasingSDKs <PATH_TO_current.textproto> \
64+
-existingVersions <PATH_TO_all_firebase_ios_sdks.textproto> \
65+
-customSpecRepos sso://cpdc-internal/firebase
66+
```
67+
68+
## Debugging
69+
70+
You can generate an Xcode project for the tool by running `swift package generate-xcodeproj` in this directory.
71+
See the above instructions for adding Launch Arguments to the Xcode build.
572

673
## Priorities
774

0 commit comments

Comments
 (0)