remove leading path from branch name
Remove the f/ or r/ from a branch name so we can create valid prefix for the new manifest that gets created with the --manifest flag. Change-Id: I4eb8f3c70f85566463fb114944309597241a7a89 Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
parent
5003bb100d
commit
5e85a4bb54
@ -100,7 +100,15 @@ if [ $MANIFEST -eq 1 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_manifest="$(dirname $manifest)/${branch}-$(basename $manifest)"
|
# String the leading feature (f/) or branch (b/) from the
|
||||||
|
# branch name so we have a valid branch prefix
|
||||||
|
if [[ ${branch} =~ .*/.*$ ]]; then
|
||||||
|
manifest_prefix="$(basename ${branch})"
|
||||||
|
else
|
||||||
|
manifest_prefix="${branch}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
new_manifest="$(dirname $manifest)/$manifest_prefix-$(basename $manifest)"
|
||||||
if [ -f $new_manifest ]; then
|
if [ -f $new_manifest ]; then
|
||||||
echo_stderr "branched manifest file already present '$new_manifest'."
|
echo_stderr "branched manifest file already present '$new_manifest'."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user