3636
3737echo " Found latest version: ${VERSION} "
3838
39- # Construct download URL (matches goreleaser name template)
40- TAR_NAME=" agentmesh_${OS_NAME} _${ARCH_NAME} .tar.gz"
41- DOWNLOAD_URL=" https://github.com/${REPO} /releases/download/${VERSION} /${TAR_NAME} "
4239CHECKSUMS_URL=" https://github.com/${REPO} /releases/download/${VERSION} /checksums.txt"
4340
4441# Create a temporary directory
4542TMP_DIR=$( mktemp -d)
4643trap ' rm -rf "$TMP_DIR"' EXIT
4744cd " $TMP_DIR "
4845
49- echo " Downloading ${DOWNLOAD_URL} ..."
50- if ! curl -sfL -o " ${TAR_NAME} " " ${DOWNLOAD_URL} " ; then
51- echo " Error: Failed to download ${DOWNLOAD_URL} "
52- exit 1
53- fi
54-
5546echo " Downloading ${CHECKSUMS_URL} ..."
5647if ! curl -sfL -o checksums.txt " ${CHECKSUMS_URL} " ; then
5748 echo " Error: Failed to download ${CHECKSUMS_URL} "
5849 exit 1
5950fi
6051
61- echo " Verifying SHA-256 checksum..."
52+ # Construct download URL (matches goreleaser name template, with fallback for pre-rename tags)
53+ TAR_NAME=" agentmesh_${OS_NAME} _${ARCH_NAME} .tar.gz"
6254EXPECTED_SUM=$( awk -v f=" ${TAR_NAME} " ' $2 == f {print $1}' checksums.txt)
6355if [ -z " ${EXPECTED_SUM} " ]; then
64- echo " Error: ${TAR_NAME} not found in checksums.txt"
56+ TAR_NAME=" sam_${OS_NAME} _${ARCH_NAME} .tar.gz"
57+ EXPECTED_SUM=$( awk -v f=" ${TAR_NAME} " ' $2 == f {print $1}' checksums.txt)
58+ fi
59+ if [ -z " ${EXPECTED_SUM} " ]; then
60+ echo " Error: archive for ${OS_NAME} _${ARCH_NAME} not found in checksums.txt"
61+ exit 1
62+ fi
63+
64+ DOWNLOAD_URL=" https://github.com/${REPO} /releases/download/${VERSION} /${TAR_NAME} "
65+ echo " Downloading ${DOWNLOAD_URL} ..."
66+ if ! curl -sfL -o " ${TAR_NAME} " " ${DOWNLOAD_URL} " ; then
67+ echo " Error: Failed to download ${DOWNLOAD_URL} "
6568 exit 1
6669fi
70+
71+ echo " Verifying SHA-256 checksum..."
6772if command -v sha256sum > /dev/null 2>&1 ; then
6873 ACTUAL_SUM=$( sha256sum " ${TAR_NAME} " | awk ' {print $1}' )
6974elif command -v shasum > /dev/null 2>&1 ; then
@@ -82,7 +87,7 @@ tar -xzf "${TAR_NAME}"
8287
8388echo " Installing to ${INSTALL_DIR} (may require sudo)..."
8489INSTALLED_BINS=()
85- for b in agentmesh-one agentmesh-node agentmesh-control-plane agentmesh-router mcp-client agentmesh-console; do
90+ for b in agentmesh-one agentmesh-node agentmesh-control-plane agentmesh-router mcp-client agentmesh-console sam-one sam-node sam-control-plane sam-router sam-console ; do
8691 if [ -f " $b " ]; then
8792 INSTALLED_BINS+=(" $b " )
8893 fi
0 commit comments