From 51039b4bd5724924a89bb0cb83ce494fc5961e0e Mon Sep 17 00:00:00 2001 From: FingerLeader Date: Mon, 15 Jul 2024 18:56:47 +0800 Subject: [PATCH] update nightly version info Signed-off-by: FingerLeader --- .github/workflows/release.yml | 10 +++------- internal/cli/version/version.go | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f770b207..ff6ca3ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,6 @@ on: push: tags: - "v*" - - "nightly-*" jobs: goreleaser_and_TiUP: @@ -72,13 +71,10 @@ jobs: 'linux arm64' ) - # check if the tag name is nightly - if [[ "$REL_VER" == *nightly-* ]]; then - export VER="${REL_VER}" - else + # skip the first letter v in the tag name export VER="${REL_VER:1}" - fi + for item in "${matrix[@]}" ; do os_arch=($item) os=(${os_arch[0]}) @@ -97,7 +93,7 @@ jobs: done create-pr: - if: startsWith(github.ref, 'refs/tags/v') + if: contains(github.ref, 'nightly') == false runs-on: ubuntu-latest needs: ["goreleaser_and_TiUP"] steps: diff --git a/internal/cli/version/version.go b/internal/cli/version/version.go index 11c75751..03a29a9b 100644 --- a/internal/cli/version/version.go +++ b/internal/cli/version/version.go @@ -41,7 +41,6 @@ func VersionCmd(h *internal.Helper) *cobra.Command { // Format formats a version string with the given information. func Format(ver, commit, buildDate string) string { - fmt.Println("ver:", ver) if ver == version.DevVersion && buildDate == "" && commit == "" { return fmt.Sprintf("%s version (built from source)", config.CliName) }