tvl-depot/tools/gerrit-cli.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
380 B
Nix
Raw Normal View History

# Utility script to run a gerrit command on the depot host via ssh.
# Reads the username from TVL_USERNAME, or defaults to $(whoami)
{ pkgs, ... }:
pkgs.writeShellScriptBin "gerrit" ''
TVL_USERNAME=''${TVL_USERNAME:-$(whoami)}
if which ssh 2>/dev/null; then
ssh=ssh
else
ssh="${pkgs.openssh}/bin/ssh"
fi
$ssh $TVL_USERNAME@code.tvl.fyi -p 29418 -- gerrit $@
''