Skip to content

Commit

Permalink
Merge branch 'master' into fix-copy
Browse files Browse the repository at this point in the history
  • Loading branch information
bufferflies authored Dec 27, 2023
2 parents 83f469e + b35b0cd commit bb9bc2d
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 66 deletions.
19 changes: 0 additions & 19 deletions build.ps1

This file was deleted.

3 changes: 3 additions & 0 deletions scripts/dashboard-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file is updated by running scripts/update-dashboard.sh
# Don't edit it manullay
2023.12.18.1
4 changes: 3 additions & 1 deletion scripts/describe-dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ DASHBOARD_DIR=$(go list -f "{{.Dir}}" -m github.com/pingcap/tidb-dashboard)
if [ "$1" = "git-hash" ]; then
echo "${DASHBOARD_DIR}" | awk -F- '{print $NF}'
elif [ "$1" = "internal-version" ]; then
grep -v '^#' "${DASHBOARD_DIR}/release-version"
CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BASE_DIR="$(dirname "$CUR_DIR")"
grep -v '^#' "$BASE_DIR/scripts/dashboard-version"
else
exit 1
fi
45 changes: 0 additions & 45 deletions scripts/embed-dashboard-ui.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/embed-dashboard-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ mkdir -p "${CACHE_DIR}"

function download_embed_asset {
echo '+ Discover TiDB Dashboard release version'
DASHBOARD_RELEASE_VERSION=$(grep -v '^#' "${DASHBOARD_DIR}/release-version")
DASHBOARD_RELEASE_VERSION=$(grep -v '^#' "${BASE_DIR}/scripts/dashboard-version")
echo " - TiDB Dashboard release version: ${DASHBOARD_RELEASE_VERSION}"

echo '+ Check whether pre-built assets are available'
Expand Down
32 changes: 32 additions & 0 deletions scripts/update-dashboard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail

CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BASE_DIR="$(dirname "$CUR_DIR")"
DASHBOARD_VERSION_FILE="$BASE_DIR/scripts/dashboard-version"
# old version
DASHBOARD_VERSION=$(grep -v '^#' "$DASHBOARD_VERSION_FILE")

# new version
# Usage: ./scripts/update-dashboard.sh <version>
# Example: ./scripts/update-dashboard.sh 2023.12.18.1
if [ "$#" -ge 1 ]; then
DASHBOARD_VERSION=$1
echo $1 > $DASHBOARD_VERSION_FILE
fi

echo "+ Update dashboard version to v$DASHBOARD_VERSION"

cd $BASE_DIR

go get -d github.com/pingcap/tidb-dashboard@v$DASHBOARD_VERSION
go mod tidy
make pd-server
go mod tidy

cd tests/integrations/client
go mod tidy
cd ../mcs
go mod tidy
cd ../tso
go mod tidy

0 comments on commit bb9bc2d

Please sign in to comment.