Update MD5 checksum generation to include both binary and zip

- Modified mbetter_latest.md5.txt to contain two lines:
  client:md5sum_of_MbetterClient_binary
  zip:md5sum_of_mbetterc_latest.zip
- Provides integrity verification for both the executable and distribution package
parent 762f0f10
...@@ -93,10 +93,20 @@ if [ -d "dist" ] && [ "$(ls -A dist)" ]; then ...@@ -93,10 +93,20 @@ if [ -d "dist" ] && [ "$(ls -A dist)" ]; then
zip -r mbetterc_latest.zip "$EXECUTABLE_NAME" zip -r mbetterc_latest.zip "$EXECUTABLE_NAME"
echo " 📦 Created: mbetterc_latest.zip" echo " 📦 Created: mbetterc_latest.zip"
# Generate MD5 checksum # Generate MD5 checksums for both binary and zip
if command -v md5sum &> /dev/null; then if command -v md5sum &> /dev/null; then
md5sum mbetterc_latest.zip > mbetter_latest.md5.txt # Calculate MD5 for the binary
echo " 🔐 Generated MD5 checksum: mbetter_latest.md5.txt" BINARY_MD5=$(md5sum "$EXECUTABLE_NAME" | cut -d' ' -f1)
# Calculate MD5 for the zip
ZIP_MD5=$(md5sum mbetterc_latest.zip | cut -d' ' -f1)
# Write both checksums to file
echo "client:$BINARY_MD5" > mbetter_latest.md5.txt
echo "zip:$ZIP_MD5" >> mbetter_latest.md5.txt
echo " 🔐 Generated MD5 checksums: mbetter_latest.md5.txt"
echo " Binary MD5: $BINARY_MD5"
echo " Zip MD5: $ZIP_MD5"
else else
echo " ⚠️ md5sum command not available, skipping checksum generation" echo " ⚠️ md5sum command not available, skipping checksum generation"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment