Newer
Older
bremer-ios-app / Pods / Realm / scripts / generate-rlmversion.sh
yhornisse on 10 Sep 2023 438 bytes Initial Commit
#!/bin/sh

: ${SRCROOT:?"generate-rlmversion.sh must be invoked as part of an Xcode script phase"}

TEMPORARY_FILE="${TARGET_TEMP_DIR}/RLMVersion.h"
DESTINATION_FILE="${DERIVED_FILE_DIR}/RLMVersion.h"

echo "#define REALM_COCOA_VERSION @\"$(sh build.sh get-version)\"" > ${TEMPORARY_FILE}

if ! cmp -s "${TEMPORARY_FILE}" "${DESTINATION_FILE}"; then
  echo "Updating ${DESTINATION_FILE}"
  cp "${TEMPORARY_FILE}" "${DESTINATION_FILE}"
fi