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
42fe82ac
Commit
42fe82ac
authored
10 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Workspaces created from AU tags are now identified"
parents
f11902a7
f02f520d
No related branches found
Branches containing commit
Tags
AU_LINUX_GECKO_LF.BR.1.2.3.00.00.00.000.116
LF.BR.1.2.3-11600-8x09.0
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 @
42fe82ac
#!/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.
#
# Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
...
...
@@ -36,20 +36,26 @@ if [[ ! ( -f build/envsetup.sh ) ]]; then
exit
1
fi
TREEID
=
if
[[
-f
.repo/manifest.xml
]]
;
then
# Tokenize <default revision="x_y_z"/> by '_'
TOKENS
=
$(
repo info
-l
.repo/manifest 2>/dev/null |
sed
-e
'/merge/!d ; s/^.*branch:// ; s/.*\///; s/.*b2g_//g;'
)
MANIFEST_ID
=
for
T
in
$TOKENS
;
do
if
[
-z
$MANIFEST_ID
]
;
then
MANIFEST_ID
=
$T
else
MANIFEST_ID
=
${
MANIFEST_ID
}
_
$T
fi
TREEID
=
"
$MANIFEST_ID
$TREEID
"
done
mergeBranch
=
$(
repo info
-l
.repo/manifest 2>/dev/null |
sed
-ne
's/^Manifest merge branch: \(.*\)$/\1/p'
)
# Drop 'ref/tags/' if present
mergeBranch
=
$(
basename
$mergeBranch
)
# Check for an AU tag and extract the corresponding branch name
mergeBranch
=
${
mergeBranch
#AU_LINUX_GECKO_
}
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]
}
# Old-style branch names are lowercase
if
[[
$mergeBranch
=
~ ^B2G_
]]
;
then
mergeBranch
=
${
mergeBranch
,,
}
fi
# Drop b2g_ prefix from old-style branch names
mergeBranch
=
${
mergeBranch
#b2g_
}
echo
$mergeBranch
all
else
echo
all
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