Skip to content

Commit

Permalink
Only use the embedded version
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbuddy committed Mar 23, 2024
1 parent 1e8f1a6 commit 98edb1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
15 changes: 3 additions & 12 deletions cmd/bz/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"path"
"path/filepath"
"regexp"
"runtime/debug"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -219,19 +218,11 @@ func (b *bz) info() error {
}

func (b *bz) version() error {
version = "dev"
commit = "none"
date = "unknown"
info, ok := debug.ReadBuildInfo()
if ok {
fmt.Printf("Installed version: %s\n", info.Main.Version)
} else {
fmt.Printf(
`Version: %s
fmt.Printf(
`Version: %s
Commit: %s
Date %s`, version, commit, date)
fmt.Println()
}
fmt.Println()
return nil
}

Expand Down
7 changes: 4 additions & 3 deletions scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fi

tag=$(git describe --abbrev=0 --tags)

echo "The current version is ${tag}, please enter a new version"
echo "The current version is ${tag}, please enter a new version (without the v)"
version=""

while ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; do
Expand All @@ -42,10 +42,11 @@ fi
./scripts/check
echo "Using version $version, releasing..."

# update version
# add the version
git tag -a "v${version}" -m"Release version ${version}"

# update version
goreleaser release --clean
git push
git push origin "v${version}"

url="https://github.com/boardzilla/boardzilla-devtools/releases"
Expand Down

0 comments on commit 98edb1a

Please sign in to comment.