summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2017-05-08 13:30:34 -0500
committerElliott Hughes2017-05-09 10:21:54 -0500
commit4d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087 (patch)
tree38585ad0025cc44b0eb63f527c4007795a5e0380 /platform_tools_tool_version.mk
parentee9e5d098191cf1fa0932db7498963de3d6dcf1b (diff)
downloadplatform-system-core-4d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087.tar.gz
platform-system-core-4d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087.tar.xz
platform-system-core-4d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087.zip
Show the "platform tools" version in adb/fastboot --version.
Annoyingly folks parse the "adb --version" output so we have the less-interesting protocol version first. But at least now we'll have the "real" version somewhere... Bug: N/A Test: "adb --version"/"fastboot --version" Change-Id: Ia85b561bd8d84c6fd6995923730d36f53b2f800b
Diffstat (limited to 'platform_tools_tool_version.mk')
-rw-r--r--platform_tools_tool_version.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/platform_tools_tool_version.mk b/platform_tools_tool_version.mk
new file mode 100644
index 000000000..73229e6d9
--- /dev/null
+++ b/platform_tools_tool_version.mk
@@ -0,0 +1,22 @@
1# Copyright (C) 2017 Google Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# We rewrite ${PLATFORM_SDK_VERSION} with 0 rather than $(PLATFORM_SDK_VERSION)
16# because on the actual platform tools release branches the file contains a
17# literal instead. Using 0 lets us easily distinguish non-canonical builds.
18platform_tools_version := $(shell sed \
19 's/$${PLATFORM_SDK_VERSION}/0/ ; s/^Pkg.Revision=\(.*\)/\1/p ; d' \
20 $(ANDROID_BUILD_TOP)/development/sdk/plat_tools_source.prop_template \
21 )
22tool_version := $(platform_tools_version)-$(BUILD_NUMBER_FROM_FILE)