Skip to content

Commit c6ee17f

Browse files
vbcherepanovaojea
authored andcommitted
release: publish checksums.txt and sync the site install.sh
Fixes #672
1 parent ce11cc4 commit c6ee17f

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

‎.goreleaser.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,7 @@ archives:
102102
- goos: windows
103103
formats:
104104
- zip
105+
checksum:
106+
# install.sh downloads releases/download/<tag>/checksums.txt; keep the name
107+
# fixed so it does not follow project_name and the version.
108+
name_template: checksums.txt

‎site/static/install.sh‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,39 @@ fi
3636

3737
echo "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}"
4239
CHECKSUMS_URL="https://github.com/${REPO}/releases/download/${VERSION}/checksums.txt"
4340

4441
# Create a temporary directory
4542
TMP_DIR=$(mktemp -d)
4643
trap 'rm -rf "$TMP_DIR"' EXIT
4744
cd "$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-
5546
echo "Downloading ${CHECKSUMS_URL}..."
5647
if ! curl -sfL -o checksums.txt "${CHECKSUMS_URL}"; then
5748
echo "Error: Failed to download ${CHECKSUMS_URL}"
5849
exit 1
5950
fi
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"
6254
EXPECTED_SUM=$(awk -v f="${TAR_NAME}" '$2 == f {print $1}' checksums.txt)
6355
if [ -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
6669
fi
70+
71+
echo "Verifying SHA-256 checksum..."
6772
if command -v sha256sum >/dev/null 2>&1; then
6873
ACTUAL_SUM=$(sha256sum "${TAR_NAME}" | awk '{print $1}')
6974
elif command -v shasum >/dev/null 2>&1; then
@@ -82,7 +87,7 @@ tar -xzf "${TAR_NAME}"
8287

8388
echo "Installing to ${INSTALL_DIR} (may require sudo)..."
8489
INSTALLED_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

Comments
 (0)