Skip to content

Commit 0a4883a

Browse files
committed
Xcode build: use the same files as the CMake build for versioning
Closes fish-shell#4671.
1 parent 6066e24 commit 0a4883a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

build_tools/xcode_version_gen.sh

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@
22
# Expects to be called from Xcode (Run Script build phase),
33
# write version number C preprocessor macro to header file.
44

5-
tmp="$SCRIPT_OUTPUT_FILE_1"
65
ver="$SCRIPT_OUTPUT_FILE_0"
76

87
./build_tools/git_version_gen.sh
98

10-
cat FISH-BUILD-VERSION-FILE | awk -F= '{printf("#define %s \"%s\"\n",$1,$2)}' > "$tmp"
11-
12-
cmp --quiet "$tmp" "$ver"
9+
cmp --quiet "FISH-BUILD-VERSION-FILE" "$ver"
1310
if [ $? -ne 0 ]; then
14-
/bin/mv "$tmp" "$ver"
15-
else
16-
/bin/rm "$tmp"
11+
/bin/cp FISH-BUILD-VERSION-FILE "$ver"
1712
fi

fish.xcodeproj/project.pbxproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1534,8 +1534,7 @@
15341534
inputPaths = (
15351535
);
15361536
outputPaths = (
1537-
"$(SHARED_DERIVED_FILE_DIR)/fish-build-version.h",
1538-
"$(SHARED_DERIVED_FILE_DIR)/force-fish-build-version.h",
1537+
"$(SHARED_DERIVED_FILE_DIR)/FISH-BUILD-VERSION-FILE",
15391538
);
15401539
runOnlyForDeploymentPostprocessing = 0;
15411540
shellPath = /bin/sh;

0 commit comments

Comments
 (0)