chore(get dashboard): fix sed error on mac

This commit is contained in:
zhanghongtong 2021-01-07 16:45:39 +08:00 committed by Rory Z
parent 2b481dabe7
commit 7e450ac4c6
1 changed files with 6 additions and 1 deletions

View File

@ -12,8 +12,13 @@ DOWNLOAD_URL='https://github.com/emqx/emqx-dashboard-frontend/releases/download'
DASHBOARD_PATH='apps/emqx_dashboard/priv'
case $(uname) in
*Darwin*) SED="sed -E";;
*) SED="sed -r";;
esac
version() {
grep -oE 'github_ref: (.*)' "$DASHBOARD_PATH/www/version" | sed -r 's|github_ref: refs/tags/(.*)|\1|g'
grep -oE 'github_ref: (.*)' "$DASHBOARD_PATH/www/version" | $SED 's|github_ref: refs/tags/(.*)|\1|g'
}
if [ -d "$DASHBOARD_PATH/www" ] && [ "$(version)" = "$VERSION" ]; then