Skip to content

Commit

Permalink
fix: get md5 on linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardo2016x committed Oct 17, 2024
1 parent 62a7fc1 commit 151c421
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

script_dir="$( cd "$( dirname "$0" )" && pwd )"
project_dir=$(dirname "$script_dir")
systype=$(uname -s)

. $script_dir/fns.sh --source-only

Expand All @@ -27,7 +28,12 @@ pack_dist_to_zip $TARGET_FILE;

cd $project_dir;

md5_value=$(md5 -q $TARGET_FILE);
systype=$(uname -s)
if [ $systype = "Darwin" ]; then
md5_value=$(md5 -q $TARGET_FILE);
elif [ $systype = "Linux" ]; then
md5_value=$(md5sum $TARGET_FILE | awk '{ print $1 }');
fi
echo "[pack] (md5: $TARGET_FILE) $md5_value";

# upload to storage
Expand All @@ -41,7 +47,7 @@ if [ -z $NO_UPLOAD ]; then
fi

echo "[pack] start upload...";
# aws s3 cp $QUIET_PARASM $project_dir/tmp/ s3://$RABBY_BUILD_BUCKET/rabby/autobuild/RabbyDebug-$CURRENT_TIME --recursive --exclude="*" --include "*.zip" --acl public-read
aws s3 cp $QUIET_PARASM $project_dir/tmp/ s3://$RABBY_BUILD_BUCKET/rabby/autobuild/RabbyDebug-$CURRENT_TIME --recursive --exclude="*" --include "*.zip" --acl public-read
echo "[pack] uploaded. DOWNLOAD_URL is $DOWNLOAD_URL";

if [ ! -z $notify_lark ]; then
Expand Down

0 comments on commit 151c421

Please sign in to comment.