Skip to content

Commit

Permalink
Add RTM version support
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonghyunCho committed Oct 12, 2023
1 parent a45cfae commit f13fce8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
7 changes: 6 additions & 1 deletion workload/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $(TMPDIR)/dotnet-version.config: $(TOP)/build/Versions.props
DOTNET_VERSION_BAND = $(firstword $(subst -, ,$(DOTNET_VERSION)))

IS_PRERELEASE=$(findstring -,$(DOTNET_VERSION))
IS_RTM=$(findstring -rtm,$(DOTNET_VERSION))
VERSIONS=$(shell echo $(DOTNET_VERSION) | tr "." "\n")
ifneq ($(IS_PRERELEASE),)
VERSIONS := $(shell echo $(VERSIONS) | tr "-" "\n")
Expand All @@ -32,7 +33,11 @@ ifeq ($(MAJOR),6)
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(BAND)
else
ifneq ($(IS_PRERELEASE),)
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE).$(PRERELEASE_VERSION)
ifneq ($(IS_RTM),)
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE)
else
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE).$(PRERELEASE_VERSION)
endif
else
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)
endif
Expand Down
6 changes: 5 additions & 1 deletion workload/scripts/workload-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $LatestVersionMap = @{
"$ManifestBaseName-8.0.100-preview.7" = "7.0.122";
"$ManifestBaseName-8.0.100-rc.1" = "7.0.124";
"$ManifestBaseName-8.0.100-rc.2" = "7.0.125";
"$ManifestBaseName-8.0.100-rtm.23511" = "7.0.126";
"$ManifestBaseName-8.0.100-rtm" = "7.0.127";
}

function New-TemporaryDirectory {
Expand Down Expand Up @@ -163,6 +163,10 @@ function Install-TizenWorkload([string]$DotnetVersion)
$DotnetTargetVersionBand = $DotnetVersionBand + $SplitVersion[2].SubString(3) + $VersionSplitSymbol + $($SplitVersion[3])
$ManifestName = "$ManifestBaseName-$DotnetTargetVersionBand"
}
elseif ($DotnetVersion.Contains("-rtm") -and ($SplitVersion.Count -ge 3)) {
$DotnetTargetVersionBand = $DotnetVersionBand + $SplitVersion[2].SubString(3)
$ManifestName = "$ManifestBaseName-$DotnetTargetVersionBand"
}
else {
$DotnetTargetVersionBand = $DotnetVersionBand
}
Expand Down
5 changes: 4 additions & 1 deletion workload/scripts/workload-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ LatestVersionMap=(
"$MANIFEST_BASE_NAME-8.0.100-preview.7=7.0.122"
"$MANIFEST_BASE_NAME-8.0.100-rc.1=7.0.124"
"$MANIFEST_BASE_NAME-8.0.100-rc.2=7.0.125"
"$MANIFEST_BASE_NAME-8.0.100-rtm.23511=7.0.126"
"$MANIFEST_BASE_NAME-8.0.100-rtm=7.0.127"
)

while [ $# -ne 0 ]; do
Expand Down Expand Up @@ -154,6 +154,9 @@ function install_tizenworkload() {
if [[ "$DOTNET_VERSION" == *"-preview"* || $DOTNET_VERSION == *"-rc"* || $DOTNET_VERSION == *"-alpha"* ]] && [[ ${#array[@]} -ge 4 ]]; then
DOTNET_TARGET_VERSION_BAND="$DOTNET_VERSION_BAND${array[2]:3}.${array[3]}"
MANIFEST_NAME="$MANIFEST_BASE_NAME-$DOTNET_TARGET_VERSION_BAND"
elif [[ "$DOTNET_VERSION" == *"-rtm"* ]] && [[ ${#array[@]} -ge 3 ]]; then
DOTNET_TARGET_VERSION_BAND="$DOTNET_VERSION_BAND${array[2]:3}"
MANIFEST_NAME="$MANIFEST_BASE_NAME-$DOTNET_TARGET_VERSION_BAND"
else
DOTNET_TARGET_VERSION_BAND=$DOTNET_VERSION_BAND
fi
Expand Down

0 comments on commit f13fce8

Please sign in to comment.