mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 05:51:43 +01:00
cros_workon: Add support for revisions other than master
This changes adds support for specifying a revision to use for cros_workon other than master. BUG=chromium-os:33688 TEST=used cros_workon to workon a project, repo synced, and verified the src was not synced to master but to the revision requested. CQ-DEPEND:I3a0166aaf4baa3af008ba24e5e887c0ea6b6ab6e Change-Id: I53cbf2819fc557c3ce6eca08c93a57598a64d85c Signed-off-by: Rhyland Klein <rklein@nvidia.com> Reviewed-on: https://gerrit.chromium.org/gerrit/30914 Commit-Ready: Brian Harring <ferringb@chromium.org> Reviewed-by: Brian Harring <ferringb@chromium.org>
This commit is contained in:
parent
23da619f13
commit
94d5e60654
@ -22,6 +22,8 @@ DEFINE_boolean host "${FLAGS_FALSE}" \
|
||||
"Uses the host instead of board"
|
||||
DEFINE_string remote "" \
|
||||
"For non-workon projects, the git remote to use."
|
||||
DEFINE_string revision "" \
|
||||
"Use to override the manifest defined default revision used for a project"
|
||||
DEFINE_string command "git status" \
|
||||
"The command to be run by forall."
|
||||
DEFINE_boolean all "${FLAGS_FALSE}" \
|
||||
@ -275,11 +277,12 @@ regen_manifest_and_sync() {
|
||||
need_repo_sync='yes'
|
||||
for S in "${CROS_WORKON_SRCDIR[@]}"; do
|
||||
local srcdir=$(readlink -m "${S}")
|
||||
local revision="${FLAGS_revision:+--revision=${FLAGS_revision}}"
|
||||
if [ -z "${FLAGS_remote}" ]; then
|
||||
loman add --workon "${CROS_WORKON_PROJECT[i]}"
|
||||
loman add --workon "${CROS_WORKON_PROJECT[i]}" "${revision}"
|
||||
else
|
||||
loman add --remote "${FLAGS_remote}" "${CROS_WORKON_PROJECT[i]}" \
|
||||
"${srcdir#${trunkdir}/}"
|
||||
loman add --remote "${FLAGS_remote}" "${revision}" \
|
||||
"${CROS_WORKON_PROJECT[i]}" "${srcdir#${trunkdir}/}"
|
||||
fi
|
||||
: $(( ++i ))
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user