提交 a51664ea 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!24 Write sha256 checksum for the package

Merge pull request !24 from 李鸿章/checksum
......@@ -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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册