diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 74 |
1 files changed, 64 insertions, 10 deletions
@@ -36,24 +36,59 @@ build_dir_CYGWIN() echo build-vc100 } +viewer_channel_suffix() +{ + local package_name="$1" + local suffix_var="${package_name}_viewer_channel_suffix" + local suffix=$(eval "echo \$${suffix_var}") + if [ "$suffix"x = ""x ] + then + echo "" + else + echo "_$suffix" + fi +} + installer_Darwin() { - ls -1td "$(build_dir_Darwin ${last_built_variant:-Release})/newview/"*.dmg 2>/dev/null | sed 1q + local package_name="$1" + local package_dir="$(build_dir_Darwin ${last_built_variant:-Release})/newview/" + local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i386\\.dmg\$" + # since the additional packages are built after the base package, + # sorting oldest first ensures that the unqualified package is returned + # even if someone makes a qualified name that duplicates the last word of the base name + local package=$(ls -1tr "$package_dir" 2>/dev/null | grep -E "$pattern" | head -n 1) + test "$package"x != ""x && echo "$package_dir/$package" } installer_Linux() { - ls -1td "$(build_dir_Linux ${last_built_variant:-Release})/newview/"*.tar.bz2 2>/dev/null | sed 1q + local package_name="$1" + local package_dir="$(build_dir_Linux ${last_built_variant:-Release})/newview/" + local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.bz2\$" + # since the additional packages are built after the base package, + # sorting oldest first ensures that the unqualified package is returned + # even if someone makes a qualified name that duplicates the last word of the base name + package=$(ls -1tr "$package_dir" 2>/dev/null | grep -E "$pattern" | head -n 1) + test "$package"x != ""x && echo "$package_dir/$package" } installer_CYGWIN() { - v=${last_built_variant:-Release} - d=$(build_dir_CYGWIN $v) - if [ -r "$d/newview/$v/touched.bat" ] + local package_name="$1" + local variant=${last_built_variant:-Release} + local build_dir=$(build_dir_CYGWIN ${variant}) + local package_dir + if [ "$package_name"x = ""x ] + then + package_dir="${build_dir}/newview/${variant}" + else + package_dir="${build_dir}/newview/${package_name}/${variant}" + fi + if [ -r "${package_dir}/touched.bat" ] then - p=$(sed 's:.*=::' "$d/newview/$v/touched.bat") - echo "$d/newview/$v/$p" + local package_file=$(sed 's:.*=::' "${package_dir}/touched.bat") + echo "${package_dir}/${package_file}" fi } @@ -275,7 +310,7 @@ then if $build_viewer_deb && [ "$last_built_variant" == "Release" ] then begin_section "Build Viewer Debian Package" - local have_private_repo=false + have_private_repo=false # mangle the changelog dch --force-bad-version \ --distribution unstable \ @@ -347,18 +382,31 @@ then if $build_viewer then begin_section Upload Installer - # Upload installer - note that ONLY THE FIRST ITEM uploaded as "installer" - # will appear in the version manager. + # Upload installer package=$(installer_$arch) if [ x"$package" = x ] || test -d "$package" then # Coverity doesn't package, so it's ok, anything else is fail succeeded=$build_coverity else + # Upload base package. upload_item installer "$package" binary/octet-stream upload_item quicklink "$package" binary/octet-stream [ -f $build_dir/summary.json ] && upload_item installer $build_dir/summary.json text/plain + # Upload additional packages. + for package_id in $additional_packages + do + package=$(installer_$arch "$package_id") + if [ x"$package" != x ] + then + upload_item installer "$package" binary/octet-stream + upload_item quicklink "$package" binary/octet-stream + else + record_failure "Failed to find additional package for '$package_id'." + fi + done + case "$last_built_variant" in Release) # Upload crash reporter files @@ -367,6 +415,12 @@ then upload_item symbolfile "$build_dir/$symbolfile" binary/octet-stream done + # Upload the actual dependencies used + if [ -r "$build_dir/packages/installed-packages.xml" ] + then + upload_item installer "$build_dir/packages/installed-packages.xml" text/xml + fi + # Upload the llphysicsextensions_tpv package, if one was produced # *TODO: Make this an upload-extension if [ -r "$build_dir/llphysicsextensions_package" ] |