Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update script to allow single platform builds #76 #79

Merged
merged 5 commits into from
Jan 20, 2025
Merged

Conversation

jasonacox
Copy link
Owner

@jasonacox jasonacox commented Jan 20, 2025

Updated build script to allow building for single platform targets: macOS, iOS or tvOS. Specify with -p macOS. Default build is for "all" as it has been. Added examples apps for tvOS and macOS.

References

Closes #77
Closes #76

@@ -31,14 +31,16 @@ alert="\033[0m${red}\033[1m"
alertdim="\033[0m${red}\033[2m"

# Set trap to help debug any build errors
trap 'echo -e "${alert}** ERROR with Build - Check /tmp/curl*.log${alertdim}"; tail -30 /tmp/curl*.log' INT TERM EXIT
trap 'echo -e "${alert}** ERROR with Build on line $LINENO ($0) - Check /tmp/curl*.log${alertdim}"; tail -30 /tmp/curl*.log' ERR TERM EXIT
trap 'exit 1' INT
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated traps to catch user cancellation and to provide more details during build errors (line number and file).

case "$choice" in
n|N ) echo "Exiting"; exit 1 ;;
* ) echo "Continuing..."; echo "" ;;
esac
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added build details (what is being built) and a user confirmation prompt before proceeding. This will help with those accidental builds that step on your working build, or if you didn't specify the right options/versions. Additionally, added a build -y option to auto-yes this prompt:

./build.sh -y

@jasonacox
Copy link
Owner Author

@jasonacox jasonacox merged commit fd4a96a into master Jan 20, 2025
2 checks passed
@jasonacox jasonacox deleted the platform branch January 20, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tvOS and macOS Examples build macOS libs only
1 participant