From 479fa3e1964d792ba9483b21b272d52f377f48a2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Jul 2023 09:56:11 -0400 Subject: SL-18837: Conditionally upload llphysicsextensions-tpv package but only when building viewer-private. Also re-fix SL-19942 workaround by deleting AUTOBUILD_CONFIGURATION before trying to build llphysicsextensions-tpv. --- build.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index bd3e84d7bd..5395a04712 100755 --- a/build.sh +++ b/build.sh @@ -121,8 +121,13 @@ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) installer=() metadata=() symbolfile=() +physicstpv=() # and dump them to GITHUB_OUTPUT when done -cleanup="$cleanup ; arrayoutput installer ; arrayoutput metadata ; arrayoutput symbolfile" +cleanup="$cleanup ; \ +arrayoutput installer ; \ +arrayoutput metadata ; \ +arrayoutput symbolfile ; \ +arrayoutput physicstpv" trap "$cleanup" EXIT arrayoutput() @@ -216,9 +221,12 @@ package_llphysicsextensions_tpv() # nat 2016-12-21: without HAVOK, can't build PhysicsExtensions_TPV. if [ "$variant" = "Release" -a "${HAVOK:-}" != "OFF" ] then - test -r "$build_dir/packages/llphysicsextensions/autobuild-tpv.xml" || fatal "No llphysicsextensions_tpv autobuild configuration found" - tpvconfig=$(native_path "$build_dir/packages/llphysicsextensions/autobuild-tpv.xml") - "$autobuild" build --quiet --config-file "$tpvconfig" -c Tpv || fatal "failed to build llphysicsextensions_tpv" + tpvconfig="$build_dir/packages/llphysicsextensions/autobuild-tpv.xml" + test -r "$tpvconfig" || fatal "No llphysicsextensions_tpv autobuild configuration found" + # SL-19942: autobuild ignores -c switch if AUTOBUILD_CONFIGURATION set + unset AUTOBUILD_CONFIGURATION + "$autobuild" build --quiet --config-file "$(native_path "$tpvconfig")" -c Tpv \ + || fatal "failed to build llphysicsextensions_tpv" # capture the package file name for use in upload later... PKGTMP=`mktemp -t pgktpv.XXXXXX` @@ -576,13 +584,15 @@ then # Upload the llphysicsextensions_tpv package, if one was produced # *TODO: Make this an upload-extension - if [ -r "$build_dir/llphysicsextensions_package" ] + # Only upload this package when building the private repo so the + # artifact is private. + if [[ "$GITHUB_REPOSITORY" == "secondlife/viewer-private" && \ + -r "$build_dir/llphysicsextensions_package" ]] then llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \ || fatal "Upload of physics extensions package failed" - ## how to make private? - ## addoutput llphysics "$llphysicsextensions_package" + physicstpv+=("$llphysicsextensions_package") fi fi -- cgit v1.2.3