summaryrefslogtreecommitdiffstats
path: root/taskcluster/scripts/misc/build-resourcemonitor.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /taskcluster/scripts/misc/build-resourcemonitor.sh
parentInitial commit. (diff)
downloadfirefox-esr-37a0381f8351b370577b65028ba1f6563ae23fdf.tar.xz
firefox-esr-37a0381f8351b370577b65028ba1f6563ae23fdf.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/scripts/misc/build-resourcemonitor.sh')
-rwxr-xr-xtaskcluster/scripts/misc/build-resourcemonitor.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/build-resourcemonitor.sh b/taskcluster/scripts/misc/build-resourcemonitor.sh
new file mode 100755
index 0000000000..6643079c76
--- /dev/null
+++ b/taskcluster/scripts/misc/build-resourcemonitor.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -x -e -v
+
+cd "$MOZ_FETCHES_DIR"/resource-monitor/ || exit 1
+COMPRESS_EXT=zst
+
+PATH="$MOZ_FETCHES_DIR/go/bin:$PATH"
+export PATH
+
+EXE_SUFFIX=""
+
+case "$1" in
+ linux64) GOOS=linux; GOARCH=amd64 ;;
+ macos64) GOOS=darwin; GOARCH=amd64 ;;
+ windows64) GOOS=windows; GOARCH=amd64; EXE_SUFFIX=".exe" ;;
+ windows32) GOOS=windows; GOARCH=386; EXE_SUFFIX=".exe" ;;
+ *)
+ echo "Unknown architecture $1 not recognized in build-resourcemonitor.sh" >&2
+ exit 1
+ ;;
+esac
+
+export GOOS
+export GOARCH
+export EXE_SUFFIX
+
+echo "GOOS=$GOOS"
+echo "GOARCH=$GOARCH"
+
+go build .
+
+STAGING_DIR="resource-monitor"
+mv "resource-monitor${EXE_SUFFIX}" resource-monitor.tmp
+mkdir "${STAGING_DIR}"
+
+cp resource-monitor.tmp "${STAGING_DIR}/resource-monitor${EXE_SUFFIX}"
+
+tar -acf "resource-monitor.tar.$COMPRESS_EXT" "${STAGING_DIR}"/
+mkdir -p "$UPLOAD_DIR"
+cp "resource-monitor.tar.$COMPRESS_EXT" "$UPLOAD_DIR"