Skip to content

Commit

Permalink
fix: minor fixes for hermes scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
okwasniewski committed Jul 31, 2024
1 parent fc8a7b9 commit 37a3a69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Pod::Spec.new do |spec|

spec.ios.vendored_frameworks = "destroot/Library/Frameworks/ios/hermes.framework"
spec.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
spec.visionos.vendored_frameworks = "destroot/Library/Frameworks/xros/hermes.framework"

if HermesEngineSourceType::isPrebuilt(source_type) then

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,28 @@ function use_env_var_or_ruby_prop {
fi
}

function use_env_var {
if [[ -n "$1" ]]; then
echo "$1"
else
echo "error: Missing DEPLOYMENT_TARGET environment variable"
fi
}

function get_release_version {
use_env_var_or_ruby_prop "${RELEASE_VERSION}" "version"
}

function get_ios_deployment_target {
use_env_var_or_ruby_prop "${IOS_DEPLOYMENT_TARGET}" "deployment_target('ios')"
use_env_var "${IOS_DEPLOYMENT_TARGET}"
}

function get_visionos_deployment_target {
use_env_var_or_ruby_prop "${XROS_DEPLOYMENT_TARGET}" "deployment_target('visionos')"
use_env_var "${XROS_DEPLOYMENT_TARGET}"
}

function get_mac_deployment_target {
use_env_var_or_ruby_prop "${MAC_DEPLOYMENT_TARGET}" "deployment_target('osx')"
use_env_var "${MAC_DEPLOYMENT_TARGET}"
}

# Build host hermes compiler for internal bytecode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ function build_universal_framework {
# this is used to preserve backward compatibility
function create_framework {
if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
ios_deployment_target=$(get_ios_deployment_target)

build_framework "iphoneos"
build_framework "iphonesimulator"
build_framework "catalyst"
Expand Down

0 comments on commit 37a3a69

Please sign in to comment.