Setting TARGET_PLATFORM_VERSION to DEFAULT_PLATFORM_VERSION during
"lunch sailfish-userdebug" causes unnecessary pain when
DEFAULT_PLATFORM_VERSION becomes invalid after branching. Only
set TARGET_PLATFORM_VERSION if it was explicitly requested with
lunch sailfish-userdebug-OPR1.
Test: build/make/tests/envsetup_tests.sh
Bug: 34972208
Bug: 37208937
Change-Id: I40ba4617e73803c5bec1a8d317382f70fb3ec3a2
Merged-In: I40ba4617e73803c5bec1a8d317382f70fb3ec3a2
lunch can now take combos in the form:
$TARGET_PRODUCT
$TARGET_PRODUCT-$TARGET_BUILD_VARIANT
$TARGET_PRODUCT-$TARGET_BUILD_VARIANT-$TARGET_PLATFORM_VERSION
If all 3 are not specified the unspecified ones will take the
default values provided by the build system (eng, and currently
OPR1).
In addition, error handling for invalid products, variants and
versions is moved to the build system.
Bug: 34972208
Test: build/make/tests/envsetup_tests.sh
Change-Id: Ib0aaa98633448ba9bd8df911704c9cb3a8ebbe85