Xcode build: use the same files as the CMake build for versioning

Closes #4671.
This commit is contained in:
David Adam
2018-01-19 22:31:08 +08:00
parent 6066e243e0
commit 0a4883a6b8
2 changed files with 3 additions and 9 deletions

View File

@@ -2,16 +2,11 @@
# Expects to be called from Xcode (Run Script build phase),
# write version number C preprocessor macro to header file.
tmp="$SCRIPT_OUTPUT_FILE_1"
ver="$SCRIPT_OUTPUT_FILE_0"
./build_tools/git_version_gen.sh
cat FISH-BUILD-VERSION-FILE | awk -F= '{printf("#define %s \"%s\"\n",$1,$2)}' > "$tmp"
cmp --quiet "$tmp" "$ver"
cmp --quiet "FISH-BUILD-VERSION-FILE" "$ver"
if [ $? -ne 0 ]; then
/bin/mv "$tmp" "$ver"
else
/bin/rm "$tmp"
/bin/cp FISH-BUILD-VERSION-FILE "$ver"
fi