Skip to content

Commit

Permalink
fix(windows): Remove version labels/metadata for windows builds (#1577)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnishtala-sumo committed May 6, 2024
1 parent 486e96f commit 97e25c7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ci/get_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ declare -i major_version
declare -i minor_version
declare -i patch_version
declare build_version
declare build_windows_version
declare ot_channel
declare -i ot_channel_version
declare sumo_channel
Expand Down Expand Up @@ -77,11 +78,14 @@ parse_version_tag() {
if [[ $ot_channel == "sumo" ]]; then
if [[ $sumo_channel != "" ]]; then
build_version="${ot_channel_version}-${sumo_channel}.${sumo_channel_version}"
build_windows_version="${ot_channel_version}.${sumo_channel_version}"
else
build_version="${ot_channel_version}"
build_windows_version="${ot_channel_version}"
fi
elif [[ $ot_channel != "" ]]; then
build_version="${ot_channel_version}"
build_windows_version="${ot_channel_version}"
fi

if [[ $OVERRIDE_BUILD_VERSION != "" ]]; then
Expand All @@ -91,6 +95,7 @@ parse_version_tag() {
exit 1
fi
build_version="${OVERRIDE_BUILD_VERSION}"
build_windows_version="${OVERRIDE_BUILD_VERSION}"
fi
}

Expand Down Expand Up @@ -148,6 +153,12 @@ validate() {
exit 1
fi

# Build version is also known as the internal version on Windows
if [[ -z "${build_windows_version}" ]]; then
echo "Windows Build version cannot be empty"
exit 1
fi

if [[ $ot_channel_version -lt 0 ]]; then
echo "Build version cannot be less than 0"
exit 1
Expand All @@ -174,7 +185,7 @@ sumo_version() {
# https://learn.microsoft.com/en-us/windows/win32/msi/productversion
# MAJOR.MINOR.PATCH.BUILD -> MAJOR.MINOR.BUILD.INTERNAL
windows_product_version() {
echo "${major_version}.${minor_version}.${patch_version}.${build_version}"
echo "${major_version}.${minor_version}.${patch_version}.${build_windows_version}"
}

parse_params "$@"
Expand Down

0 comments on commit 97e25c7

Please sign in to comment.