blob: 5125fd0c0a6933037e32ad8da6f8ffeae761e44e [file] [log] [blame]
#!/bin/bash -e
# Copyright 2019 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.
cd "$(dirname "$0")"
# Wrap all testplan commands as cipd package.
CMDPATH="./src/testplans/cmd"
OUTPATH="$(pwd -P)/.out"
if [ -e $OUTPATH ]; then
rm -r $OUTPATH/*
fi
# translation:
# all cmds | strip trailing /
COMMANDS=$(cd $CMDPATH; ls -d */ | sed 's#/##')
for go_cmd in $COMMANDS; do
(cd "$CMDPATH/$go_cmd" && go build -o "$OUTPATH/$go_cmd")
done
cipd create -pkg-def=cipd.yaml -ref latest -json-output deploy_cipd.json