Skip to content

Commit ba0f4f2

Browse files
authored
Combine nanopb scripts into a single location (#10439)
1 parent d5198ac commit ba0f4f2

File tree

25 files changed

+104
-2324
lines changed

25 files changed

+104
-2324
lines changed

Crashlytics/ProtoSupport/generate_crashlytics_protos.sh

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,8 @@
2222

2323
readonly DIR="$( git rev-parse --show-toplevel )"
2424

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/"
3025
readonly PROTO_DIR="${DIR}/Crashlytics/ProtoSupport/Protos/"
3126
readonly PROTOGEN_DIR="${DIR}/Crashlytics/Protogen/"
27+
readonly INCLUDE_PREFIX="Crashlytics/Protogen/nanopb/"
3228

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"

Crashlytics/ProtoSupport/nanopb_objc_generator.py

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

0 commit comments

Comments
 (0)