From 6a15a87782761632e11de9db515c95691a52d382 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Mon, 5 Nov 2018 15:13:23 +0800 Subject: [PATCH] Change pkgname in winpack.sh --- scripts/win/winpack.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/win/winpack.sh b/scripts/win/winpack.sh index b2ed161..f6af5d2 100644 --- a/scripts/win/winpack.sh +++ b/scripts/win/winpack.sh @@ -126,11 +126,18 @@ cp -f "$ROOT_DIR/scripts/win/generate.bat" "$ROOT_DIR/_install/tools/" source "$ROOT_DIR/pkginfo.sh" _pkgname="$1-opencv-$OpenCV_VERSION" + _rm "$ROOT_DIR/$_pkgname.exe" mv "$ROOT_DIR/_install" "$ROOT_DIR/$_pkgname" makensis "$ROOT_DIR/winpack.nsi" +_git_branch=`git symbolic-ref --short -q HEAD` +if [ "$_git_branch" == "develop" ]; then + _git_hash=`git rev-parse --short HEAD` + mv "$ROOT_DIR/$_pkgname.exe" "$ROOT_DIR/$_pkgname-dev-$_git_hash.exe" +fi + mv "$ROOT_DIR/$_pkgname" "$ROOT_DIR/_install" ################################################################################