Skip to content

Commit

Permalink
Release v2021.07.23.1 (#965) [skip pd_pr]
Browse files Browse the repository at this point in the history
* refine: thread safety write intro data (#963)

* Fix/markdownlint cli (#966)
  • Loading branch information
shhdgit committed Jul 23, 2021
1 parent 61cbaec commit 69c8e4f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -10,6 +10,10 @@ ifeq ($(UI),1)
BUILD_TAGS += ui_server
endif

ifeq ($(DISTRO_BUILD_TAG),1)
BUILD_TAGS += dashboard_distro
endif

LDFLAGS += -X "$(DASHBOARD_PKG)/pkg/utils/version.InternalVersion=$(shell grep -v '^\#' ./release-version)"
LDFLAGS += -X "$(DASHBOARD_PKG)/pkg/utils/version.Standalone=Yes"
LDFLAGS += -X "$(DASHBOARD_PKG)/pkg/utils/version.PDVersion=N/A"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/distro/default_distro_info.go
@@ -1,4 +1,4 @@
// +build !distro
// +build !dashboard_distro

package distro

Expand Down
18 changes: 14 additions & 4 deletions pkg/utils/distro/distro.go
Expand Up @@ -14,12 +14,22 @@

package distro

var data map[string]interface{}
import (
"sync/atomic"
)

func Replace(distro map[string]interface{}) {
data = distro
type introData map[string]interface{}

var data atomic.Value

func Replace(distro introData) {
data.Store(distro)
}

func Data(k string) string {
return data[k].(string)
d := data.Load().(introData)
if d[k] == nil {
return k
}
return d[k].(string)
}
2 changes: 1 addition & 1 deletion release-version
@@ -1,3 +1,3 @@
# This file specifies the TiDB Dashboard internal version, which will be printed in `--version`
# and UI. In release branch, changing this file will result in publishing a new version and tag.
2021.07.21.1
2021.07.23.1
2 changes: 1 addition & 1 deletion scripts/generate_distro_info.sh
Expand Up @@ -12,7 +12,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
PROJECT_DIR="$(dirname "$DIR")"

if [ "${DISTRO_BUILD_TAG:-}" = "1" ]; then
BUILD_TAG_PARAMETER=distro
BUILD_TAG_PARAMETER=dashboard_distro
else
BUILD_TAG_PARAMETER=""
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint.sh
Expand Up @@ -32,4 +32,4 @@ echo "+ Clean up go mod"
go mod tidy

echo "+ Run lints for docs"
npm_config_yes=true npx markdownlint-cli docs/**/*.md
npm_config_yes=true npx markdownlint-cli@0.27.0 docs/**/*.md

0 comments on commit 69c8e4f

Please sign in to comment.