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

View file

@ -1534,8 +1534,7 @@
inputPaths = ( inputPaths = (
); );
outputPaths = ( outputPaths = (
"$(SHARED_DERIVED_FILE_DIR)/fish-build-version.h", "$(SHARED_DERIVED_FILE_DIR)/FISH-BUILD-VERSION-FILE",
"$(SHARED_DERIVED_FILE_DIR)/force-fish-build-version.h",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;