Skip to content

Commit

Permalink
Remove the go.mod stub file after vendors have been updated, validate…
Browse files Browse the repository at this point in the history
…d or outdated vendors listed.

This helps to avoid `go build` to fail because of unconsistencies between go.mod and vendor/modules.txt files.

Signed-off-by: Benjamin Grandfond <benjamin.grandfond@docker.com>
  • Loading branch information
benja-M-1 committed Apr 6, 2022
1 parent b82d9a7 commit e0eda86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 388 deletions.
7 changes: 7 additions & 0 deletions scripts/vendor
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ if [ -z "$TYP" ]; then
usage
fi

clear() {
rm go.mod
}

init() {
# create dummy go.mod, see comment in vendor.mod
cat > go.mod <<EOL
Expand Down Expand Up @@ -50,15 +54,18 @@ case $TYP in
"update")
init
update
clear
;;
"validate")
init
update
validate
clear
;;
"outdated")
init
outdated
clear
;;
*)
echo >&2 "Unknown type $TYP"
Expand Down
Loading

0 comments on commit e0eda86

Please sign in to comment.