From 6fee2673e9c7356cff80bd32c196289c7d9cd79c Mon Sep 17 00:00:00 2001 From: Sergey Berezin Date: Mon, 1 May 2017 15:31:16 -0700 Subject: [PATCH] Add vpython to depot_tools for linux and mac BUG=717208 R=dnj@chromium.org Change-Id: If937a382be9aa4d8eb5f957386e8b1b28cc1c3ac Reviewed-on: https://chromium-review.googlesource.com/492086 Reviewed-by: Daniel Jacques Reviewed-by: Nodir Turakulov Commit-Queue: Sergey Berezin --- .gitignore | 4 ++++ cipd_bin_setup.sh | 10 ++++++++++ cipd_manifest.txt | 6 ++++++ vpython | 12 ++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 cipd_bin_setup.sh create mode 100644 cipd_manifest.txt create mode 100755 vpython diff --git a/.gitignore b/.gitignore index 2e0405346..3e06bcb8f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc # ignore cipd client files +/.cipd_bin /.cipd_client* /.versions @@ -67,3 +68,6 @@ # Ignore google AE downloaded for running testing only. testing_support/google_appengine + +# Ignore emacs / vim backup files. +*~ diff --git a/cipd_bin_setup.sh b/cipd_bin_setup.sh new file mode 100644 index 000000000..61dfb7af6 --- /dev/null +++ b/cipd_bin_setup.sh @@ -0,0 +1,10 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +function cipd_bin_setup { + local MYPATH=$(dirname "${BASH_SOURCE[0]}") + + "$MYPATH/cipd" ensure -ensure-file "$MYPATH/cipd_manifest.txt" \ + -root "$MYPATH/.cipd_bin" +} diff --git a/cipd_manifest.txt b/cipd_manifest.txt new file mode 100644 index 000000000..692ba02bd --- /dev/null +++ b/cipd_manifest.txt @@ -0,0 +1,6 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# vpython. +infra/tools/luci/vpython/${platform} git_revision:589bb41ab0ab9134d2555d7d3051d678d37b3238 diff --git a/vpython b/vpython new file mode 100755 index 000000000..674a68be8 --- /dev/null +++ b/vpython @@ -0,0 +1,12 @@ +#/bin/bash + +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +MYPATH=$(dirname "${BASH_SOURCE[0]}") + +source "$MYPATH/cipd_bin_setup.sh" +cipd_bin_setup + +exec "$MYPATH/.cipd_bin/vpython" "$@"