Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d7afa00 authored by Joe Onorato's avatar Joe Onorato
Browse files

Make RELEASE_PLATFORM_VERSION a release config flag to set platform version.

Bug: 282838389
Test: Treehugger
Merged-In: Ic6dacbdee7d2408aa8b25b4df59bf9bbc566d747
Change-Id: Ie61a7d986c2b8fe2c16117f6678b9e5a71711647
parent d6df20a0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ $(strip \
  $(if $(filter $(ALL_VERSIONS),$(2)),,
    $(error Invalid MAX_PLATFORM_VERSION '$(2)'))
  $(if $(filter $(ALL_VERSIONS),$(3)),,
    $(error Invalid DEFAULT_PLATFORM_VERSION '$(3)'))
    $(error Invalid RELEASE_PLATFORM_VERSION '$(3)'))

  $(eval allowed_versions_ := $(call find_and_earlier,$(ALL_VERSIONS),$(2)))

@@ -77,7 +77,7 @@ $(strip \
    $(filter-out $(call find_and_earlier,$(allowed_versions_),$(1)),$(allowed_versions_)))

  $(if $(filter $(allowed_versions_),$(3)),,
    $(error DEFAULT_PLATFORM_VERSION '$(3)' must be between MIN_PLATFORM_VERSION '$(1)' and MAX_PLATFORM_VERSION '$(2)'))
    $(error RELEASE_PLATFORM_VERSION '$(3)' must be between MIN_PLATFORM_VERSION '$(1)' and MAX_PLATFORM_VERSION '$(2)'))

  $(allowed_versions_))
endef
+1 −2
Original line number Diff line number Diff line
@@ -40,8 +40,7 @@ ifdef INTERNAL_BUILD_ID_MAKEFILE
  include $(INTERNAL_BUILD_ID_MAKEFILE)
endif

DEFAULT_PLATFORM_VERSION := VP1A
.KATI_READONLY := DEFAULT_PLATFORM_VERSION
# Set release configuration. The default resides in build/release/build_flags.mk.
MIN_PLATFORM_VERSION := UP1A
MAX_PLATFORM_VERSION := VP1A

+5 −5
Original line number Diff line number Diff line
@@ -14,17 +14,17 @@
# limitations under the License.
#

#

ALLOWED_VERSIONS := $(call allowed-platform-versions,\
  $(MIN_PLATFORM_VERSION),\
  $(MAX_PLATFORM_VERSION),\
  $(DEFAULT_PLATFORM_VERSION))
  $(RELEASE_PLATFORM_VERSION))

ifndef TARGET_PLATFORM_VERSION
  TARGET_PLATFORM_VERSION := $(DEFAULT_PLATFORM_VERSION)
ifdef TARGET_PLATFORM_VERSION
  $(error Do not set TARGET_PLATFORM_VERSION directly. Use RELEASE_PLATFORM_VERSION. value: $(TARGET_PLATFORM_VERSION))
endif

TARGET_PLATFORM_VERSION := $(RELEASE_PLATFORM_VERSION)

ifeq (,$(filter $(ALLOWED_VERSIONS), $(TARGET_PLATFORM_VERSION)))
  $(warning Invalid TARGET_PLATFORM_VERSION '$(TARGET_PLATFORM_VERSION)', must be one of)
  $(error $(ALLOWED_VERSIONS))
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ function check_lunch
    [ "$TARGET_PLATFORM_VERSION" = "$4" ] || ( echo "lunch $1: expected TARGET_PLATFORM_VERSION='$4', got '$TARGET_PLATFORM_VERSION'" && exit 1 )
)

default_version=$(get_build_var DEFAULT_PLATFORM_VERSION)
default_version=$(get_build_var RELEASE_PLATFORM_VERSION)

# lunch tests
check_lunch "aosp_arm64"                                "aosp_arm64" "eng"       ""