Skip to content

Commit

Permalink
Xcodebuild does not deal well with swift-macros and cross-compilation…
Browse files Browse the repository at this point in the history
…, so compile the Intel payload on an Intel machine
  • Loading branch information
migueldeicaza committed Oct 10, 2023
1 parent ce3fff5 commit 6677745
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ push-docs:
release: check-args build-release build-docs push-docs

build-release: check-args
sh scripts/release $(VERSION) $(NOTES)
sh -x scripts/release $(VERSION) $(NOTES) `git rev-parse HEAD`

check-args:
@if test x$(VERSION)$(NOTES) = x; then echo You need to provide both VERSION=XX NOTES=FILENAME arguments to this makefile target; exit 1; fi
Expand Down
12 changes: 8 additions & 4 deletions scripts/release
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
if test x$2 = x; then
echo Usage is: relase TAG RELEASE_NOTES_FILE
if test x$3 = x; then
echo Usage is: relase TAG RELEASE_NOTES_FILE COMMIT
exit 1
fi

commit=$3
if test ! -e $2; then
echo "Expected a release notes file"
exit 1
Expand Down Expand Up @@ -45,8 +45,12 @@ mkdir -p $archivePath
echo Building on $dir
echo DerivedData: $derivedData
echo ArchiveData: $archivePath
echo Commit: $3
start=`date`
xcodebuild -scheme SwiftGodot -destination platform=macOS,arch=x86_64 -derivedDataPath $derivedData -archivePath $archivePath >& $dir/x86_64.log

ssh macpro.local "mkdir -p $derivedData && mkdir -p $archivePath"
ssh macpro.local "cd cvs/SwiftGodot && git reset --hard $commit && xcodebuild -scheme SwiftGodot -destination platform=macOS,arch=x86_64 -derivedDataPath $derivedData -archivePath $archivePath" >& $dir/x86_64.log
rsync -a macpro.local:$dir/derived/ $dir/derived
if [ $arch = "arm64" ]; then
xcodebuild -scheme SwiftGodot -destination platform=macOS,arch=arm64 -derivedDataPath "${derivedData}_arm" -archivePath $archivePath >& $dir/arm64.log
fi
Expand Down

0 comments on commit 6677745

Please sign in to comment.