Give an error when trying to build "next" targets

The "next" targets aren't supported yet, so we want to fail
immediately.

If the environment variable TESTING_TARGET_RELEASE_NEXT is
set, then we'll allow a "next" build, so folks can work on
fixing this in the meantime.

Bug: 294161396
Test: "lunch mokey-next-userdebug" with and without TESTING_TARGET_RELEASE_NEXT set
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f40be02ee51dec1bd5cdf88a4419684585ef6ef3)
Change-Id: If478a4efef937a0a986bfefdb61cc25921863b25
This commit is contained in:
Greg Kaiser
2023-08-10 12:37:05 +00:00
parent 1c950f7a76
commit f5eaf3cff3

View File

@@ -76,6 +76,12 @@ ifneq ($(TARGET_RELEASE),)
ifeq ($(filter $(_all_release_configs), $(TARGET_RELEASE)),)
$(error No release config found for TARGET_RELEASE: $(TARGET_RELEASE). Available releases are: $(_all_release_configs))
else
# TODO(b/294161396): Remove this logic
ifeq ($(TARGET_RELEASE),next)
ifndef TESTING_TARGET_RELEASE_NEXT
$(error "next" releases are not supported yet. b/294161396)
endif
endif
# Choose flag files
# Don't sort this, use it in the order they gave us.
flag_value_files := $(_all_release_configs.$(TARGET_RELEASE).FILES)