Skip to content

Commit

Permalink
chore: update version format
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwantaozi committed Nov 28, 2024
1 parent f90b099 commit 208963c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions hack/lib/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ function vox_box::version::get_version_vars() {

# specify to 0.0.0 if the tree is dirty.
if [[ "${GIT_TREE_STATE:-dirty}" == "dirty" ]]; then
GIT_VERSION="0.0.0"
elif ! [[ "${GIT_VERSION}" =~ ^([0-9]+)\.([0-9]+)(\.[0-9]+)?(-?[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
GIT_VERSION="0.0.0"
GIT_VERSION="v0.0.0"
elif ! [[ "${GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
GIT_VERSION="v0.0.0"
fi

# respect specified version
Expand Down
6 changes: 3 additions & 3 deletions hack/lib/windows/version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function Get-VoxBoxVersionVar {
}
}

# Set version to '0.0.0' if the tree is dirty or version format does not match
if ($GIT_TREE_STATE -eq "dirty" -or -not ($GIT_VERSION -match '^([0-9]+)\.([0-9]+)(\.[0-9]+)?(-?[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$')) {
$GIT_VERSION = "0.0.0"
# Set version to 'v0.0.0' if the tree is dirty or version format does not match
if ($GIT_TREE_STATE -eq "dirty" -or -not ($GIT_VERSION -match 'v([0-9]+)\.([0-9]+)(\.[0-9]+)?(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$')) {
$GIT_VERSION = "v0.0.0"
}

# Respect specified version
Expand Down

0 comments on commit 208963c

Please sign in to comment.