diff --git a/build/build.sh b/build/build.sh index 577907ac21854c2dbbac74efadd4c5338646656f..ece2023201de1d10bfd6dc6cb9d63083d7f21e99 100755 --- a/build/build.sh +++ b/build/build.sh @@ -21,7 +21,7 @@ PROJECT_BASEDIR=$(dirname "$SCRIPT_BASEDIR") rename_wheel() { cd "$PROJECT_BASEDIR/output" || exit - VERSION="$1" + VERSION="$("$PYTHON" -c 'import platform; print(platform.python_version())')" PACKAGE_LIST=$(ls mindinsight-*-any.whl) || exit for PACKAGE_ORIG in $PACKAGE_LIST; do MINDINSIGHT_VERSION=$(echo "$PACKAGE_ORIG" | awk -F"-" '{print $2}') @@ -35,6 +35,14 @@ rename_wheel() { done } +write_checksum() { + cd "$PROJECT_BASEDIR/output" || exit + PACKAGE_LIST=$(ls mindinsight-*.whl) || exit + for PACKAGE_NAME in $PACKAGE_LIST; do + sha256sum -b "$PACKAGE_NAME" >"$PACKAGE_NAME.sha256" + done +} + build_wheel() { cd "$PROJECT_BASEDIR" || exit @@ -76,8 +84,8 @@ build_wheel() { mv dist output - rename_wheel "$("$PYTHON" -c 'import platform; print(platform.python_version())')" - + rename_wheel + write_checksum clean_files echo "Build success, output directory is: $PROJECT_BASEDIR/output"