Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
build
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
lf
build
Commits
f02f520d
Commit
f02f520d
authored
10 years ago
by
Michael Vines
Browse files
Options
Downloads
Patches
Plain Diff
Workspaces created from AU tags are now identified
Change-Id: Ic165faaa2593584246e1cc35c2c33352b6c84e24
parent
f11902a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
treeid.sh
+21
-15
21 additions, 15 deletions
treeid.sh
with
21 additions
and
15 deletions
treeid.sh
+
21
−
15
View file @
f02f520d
#!/bin/bash
#!/bin/bash
#
#
# Attempt to identify the
Android
tree in use. On success one or more
# Attempt to identify the tree in use. On success one or more
# tree identifiers are output to stdout.
# tree identifiers are output to stdout.
#
#
# Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
# Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
...
@@ -36,20 +36,26 @@ if [[ ! ( -f build/envsetup.sh ) ]]; then
...
@@ -36,20 +36,26 @@ if [[ ! ( -f build/envsetup.sh ) ]]; then
exit
1
exit
1
fi
fi
TREEID
=
if
[[
-f
.repo/manifest.xml
]]
;
then
if
[[
-f
.repo/manifest.xml
]]
;
then
# Tokenize <default revision="x_y_z"/> by '_'
mergeBranch
=
$(
repo info
-l
.repo/manifest 2>/dev/null |
sed
-ne
's/^Manifest merge branch: \(.*\)$/\1/p'
)
TOKENS
=
$(
repo info
-l
.repo/manifest 2>/dev/null |
sed
-e
'/merge/!d ; s/^.*branch:// ; s/.*\///; s/.*b2g_//g;'
)
# Drop 'ref/tags/' if present
MANIFEST_ID
=
mergeBranch
=
$(
basename
$mergeBranch
)
for
T
in
$TOKENS
;
do
if
[
-z
$MANIFEST_ID
]
;
then
# Check for an AU tag and extract the corresponding branch name
MANIFEST_ID
=
$T
mergeBranch
=
${
mergeBranch
#AU_LINUX_GECKO_
}
else
mergeBranch
=
${
mergeBranch
%.[0-9][0-9].[0-9][0-9].[0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9]
}
MANIFEST_ID
=
${
MANIFEST_ID
}
_
$T
fi
# Old-style branch names are lowercase
TREEID
=
"
$MANIFEST_ID
$TREEID
"
if
[[
$mergeBranch
=
~ ^B2G_
]]
;
then
done
mergeBranch
=
${
mergeBranch
,,
}
fi
# Drop b2g_ prefix from old-style branch names
mergeBranch
=
${
mergeBranch
#b2g_
}
echo
$mergeBranch
all
else
echo
all
fi
fi
echo
$TREEID
all
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment