Files
Signal-iOS/Scripts/update_plist_info.sh
Jordan Rose 42969ce9da Update to RingRTC v2.24.0
RingRTC (along with WebRTC) are no longer included as submodules; now
they are a nearly-standard pod dependency with an extra "prebuild
checksum" to download the built artifacts.

This removes the submodules as well as the storing of the WebRTC
artifact repo commit in the app's Info.plist. RingRTC already prints
the current version in debug logs, so we're not losing anything.
2023-02-06 11:53:14 -08:00

32 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
set -e
# PROJECT_DIR will be set when run from xcode, else we infer it
if [ "${PROJECT_DIR}" = "" ]; then
PROJECT_DIR=`git rev-parse --show-toplevel`
echo "inferred ${PROJECT_DIR}"
fi
# Capture project hashes that we want to add to the Info.plist
cd $PROJECT_DIR
_git_commit_signal=`git log --pretty=oneline --decorate=no | head -1`
# Remove existing .plist entry, if any.
/usr/libexec/PlistBuddy -c "Delete BuildDetails" Signal/Signal-Info.plist || true
# Add new .plist entry.
/usr/libexec/PlistBuddy -c "add BuildDetails dict" Signal/Signal-Info.plist
echo "CONFIGURATION: ${CONFIGURATION}"
if [ "${CONFIGURATION}" = "App Store Release" ]; then
/usr/libexec/PlistBuddy -c "add :BuildDetails:XCodeVersion string '${XCODE_VERSION_MAJOR}.${XCODE_VERSION_MINOR}'" Signal/Signal-Info.plist
/usr/libexec/PlistBuddy -c "add :BuildDetails:SignalCommit string '$_git_commit_signal'" Signal/Signal-Info.plist
# Use UTC
_build_datetime=`date -u`
/usr/libexec/PlistBuddy -c "add :BuildDetails:DateTime string '$_build_datetime'" Signal/Signal-Info.plist
_build_timestamp=`date +%s`
/usr/libexec/PlistBuddy -c "add :BuildDetails:Timestamp integer $_build_timestamp" Signal/Signal-Info.plist
fi