From f13fce8af0c247fada4c7c4da9246d74f242377b Mon Sep 17 00:00:00 2001 From: Jay Cho Date: Thu, 12 Oct 2023 18:19:10 +0900 Subject: [PATCH] Add RTM version support --- workload/Config.mk | 7 ++++++- workload/scripts/workload-install.ps1 | 6 +++++- workload/scripts/workload-install.sh | 5 ++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/workload/Config.mk b/workload/Config.mk index 32c3b671..3d6a5119 100644 --- a/workload/Config.mk +++ b/workload/Config.mk @@ -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") @@ -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 diff --git a/workload/scripts/workload-install.ps1 b/workload/scripts/workload-install.ps1 index 217eb52f..303c7b45 100644 --- a/workload/scripts/workload-install.ps1 +++ b/workload/scripts/workload-install.ps1 @@ -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 { @@ -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 } diff --git a/workload/scripts/workload-install.sh b/workload/scripts/workload-install.sh index 1d9d30d0..bb27d834 100755 --- a/workload/scripts/workload-install.sh +++ b/workload/scripts/workload-install.sh @@ -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 @@ -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