feat: Update 2 files
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 25s
Build-Test-Publish / build (linux/arm64) (push) Failing after 53s

This commit is contained in:
j842
2025-08-17 21:35:00 +12:00
parent 84697c0723
commit d5bbd16b16
2 changed files with 107 additions and 25 deletions

View File

@@ -27,6 +27,12 @@ export INSTALL_LOCAL="false"
[ -f "${SCRIPT_DIR}/output/dropshell" ] || die "Build failed."
# Get version from the built binary (format: YYYY.MMDD.HHMM)
VERSION=$("${SCRIPT_DIR}/output/dropshell" version | tr -d '[:space:]')
[ -z "$VERSION" ] && die "Failed to get version from dropshell"
echo "Publishing dropshell version ${VERSION} for ${ARCH}"
# download the sos binary
mkdir -p "${TEMP_DIR}"
trap 'rm -rf "${TEMP_DIR}"' EXIT
@@ -34,8 +40,23 @@ trap 'rm -rf "${TEMP_DIR}"' EXIT
curl -L -o "${SOS}" "https://getbin.xyz/sos"
chmod +x "${SOS}"
# upload arch-specific binary
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/output/${PROJECT}" "${PROJECT}:latest-${ARCH}"
# Create metadata file with version information
METADATA_FILE="${TEMP_DIR}/metadata.json"
cat > "${METADATA_FILE}" <<EOF
{
"version": "${VERSION}",
"architecture": "${ARCH}",
"project": "${PROJECT}"
}
EOF
# upload arch-specific binary with metadata
# The sos tool should support --metadata flag or similar for version info
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/output/${PROJECT}" "${PROJECT}:latest-${ARCH}" \
--metadata "version=${VERSION}"
# Also upload with version-specific tag for direct version access
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/output/${PROJECT}" "${PROJECT}:${VERSION}-${ARCH}"
# upload generic install script
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/dropshell-install.sh" "dropshell-install:latest"
@@ -43,4 +64,4 @@ chmod +x "${SOS}"
# upload server auto-setup script
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/dropshell-server-autosetup.sh" "dropshell-server-autosetup:latest"
echo "Successfully published dropshell:latest-${ARCH} to getbin.xyz"
echo "Successfully published dropshell:latest-${ARCH} (version ${VERSION}) to getbin.xyz"