From d6d0ecca50d4831809e4f37c911877644259ad7e Mon Sep 17 00:00:00 2001 From: Robert Iannucci Date: Tue, 6 Feb 2018 15:32:39 -0800 Subject: [PATCH] [prpc] Add pRPC CLI tool to depot_tools. This will be used when running infrastructure code locally (e.g. recipes) to correctly interact with LUCI service APIs (such as luci-scheduler.appspot.com). It is also generically useful to explore and interact with LUCI service APIs on the command line (for debugging/scripting). R=tandrii@chromium.org, vadimsh@chromium.org Bug: 808677 Change-Id: I41cfd4cc7e2d245d3a5d2be83f9879f92a8d1bca Reviewed-on: https://chromium-review.googlesource.com/905457 Commit-Queue: Robbie Iannucci Reviewed-by: Andrii Shyshkalov Reviewed-by: Vadim Shtayura --- cipd_manifest.txt | 3 +++ prpc | 13 +++++++++++++ prpc.bat | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100755 prpc create mode 100644 prpc.bat diff --git a/cipd_manifest.txt b/cipd_manifest.txt index 27f1f77042..1bf7c9a68d 100644 --- a/cipd_manifest.txt +++ b/cipd_manifest.txt @@ -15,3 +15,6 @@ infra/tools/luci/led/${platform} git_revision:54b6b3102fbb15ca3e3bd762ff3df7b08 # Mac toolchain installer infra/tools/mac_toolchain/${os=mac}-${arch} git_revision:d4dc0c29a004b59dcca1e69ae84eba0c932eb010 + +# LUCI rpc command line tool +infra/tools/prpc/${platform} git_revision:bf5820217a310115ae8b971dee6ff6cb894ea3bf diff --git a/prpc b/prpc new file mode 100755 index 0000000000..74153b7967 --- /dev/null +++ b/prpc @@ -0,0 +1,13 @@ +#!/bin/bash + +# Copyright 2018 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 &> /dev/null + +exec "$MYPATH/.cipd_bin/prpc" "$@" + diff --git a/prpc.bat b/prpc.bat new file mode 100644 index 0000000000..94086d1ae9 --- /dev/null +++ b/prpc.bat @@ -0,0 +1,8 @@ +@echo off +:: Copyright 2018 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. + +call "%~dp0\cipd_bin_setup.bat" > nul 2>&1 +"%~dp0\.cipd_bin\prpc.exe" %* +