scripts: makefile, dockerfile, travis, ...
This commit is contained in:
parent
4c5e7a238d
commit
51b0508512
12 changed files with 71 additions and 133 deletions
|
@ -4,26 +4,11 @@ set -o pipefail
|
|||
set -o nounset
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${0}" )" && pwd -P)"; export SCRIPT_DIR
|
||||
vendor_dir="./vendor/"
|
||||
|
||||
# We run dep install to and see if we have a diff afterwards
|
||||
echo "checking ${vendor_dir} for unintentional changes..."
|
||||
echo "checking go modules for unintentional changes..."
|
||||
|
||||
dep ensure -v
|
||||
("${SCRIPT_DIR}"/prune-dep.sh)
|
||||
go mod tidy
|
||||
git diff --exit-code go.mod
|
||||
git diff --exit-code go.sum
|
||||
|
||||
# Let see if the working directory is clean
|
||||
diffs="$(git status --porcelain -- ${vendor_dir} 2>/dev/null)"
|
||||
if [[ "$diffs" ]]; then
|
||||
{
|
||||
echo "The result of 'dep ensure' for vendor directory '${vendor_dir}' differs"
|
||||
echo
|
||||
echo "$diffs"
|
||||
echo
|
||||
echo 'Please vendor your package(s) with dep.'
|
||||
echo
|
||||
} >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo 'Congratulations! All vendoring changes are done the right way.'
|
||||
echo 'Congratulations! All go modules changes are done the right way.'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue