|
22 | 22 |
|
23 | 23 | readonly DIR="$( git rev-parse --show-toplevel )" |
24 | 24 |
|
25 | | -# Current release of nanopb being used to build the CCT protos |
26 | | -readonly NANOPB_VERSION="0.3.9.8" |
27 | | -readonly NANOPB_TEMPDIR="${DIR}/Crashlytics/nanopb_temp" |
28 | | - |
29 | | -readonly LIBRARY_DIR="${DIR}/Crashlytics/Crashlytics/" |
30 | 25 | readonly PROTO_DIR="${DIR}/Crashlytics/ProtoSupport/Protos/" |
31 | 26 | readonly PROTOGEN_DIR="${DIR}/Crashlytics/Protogen/" |
| 27 | +readonly INCLUDE_PREFIX="Crashlytics/Protogen/nanopb/" |
32 | 28 |
|
33 | | -rm -rf "${NANOPB_TEMPDIR}" |
34 | | - |
35 | | -echo "Downloading nanopb..." |
36 | | -git clone --branch "${NANOPB_VERSION}" https://github.com/nanopb/nanopb.git "${NANOPB_TEMPDIR}" |
37 | | - |
38 | | -echo "Building nanopb..." |
39 | | -pushd "${NANOPB_TEMPDIR}" |
40 | | -./tools/make_mac_package.sh |
41 | | -GIT_DESCRIPTION=`git describe --always`-macosx-x86 |
42 | | -NANOPB_BIN_DIR="dist/${GIT_DESCRIPTION}" |
43 | | -popd |
44 | | - |
45 | | -echo "Removing existing CCT protos..." |
46 | | -rm -rf "${PROTOGEN_DIR}/*" |
47 | | - |
48 | | -echo "Generating CCT protos..." |
49 | | -python "${DIR}/Crashlytics/ProtoSupport/proto_generator.py" \ |
50 | | - --nanopb \ |
51 | | - --protos_dir="${PROTO_DIR}" \ |
52 | | - --pythonpath="${NANOPB_TEMPDIR}/${NANOPB_BIN_DIR}/generator" \ |
53 | | - --output_dir="${PROTOGEN_DIR}" \ |
54 | | - --include="${PROTO_DIR}" |
55 | | - |
56 | | -rm -rf "${NANOPB_TEMPDIR}" |
| 29 | +./scripts/nanopb/generate_protos.sh "$PROTO_DIR" "$PROTOGEN_DIR" "$INCLUDE_PREFIX" |
0 commit comments