-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear go.mod after vendor scripts ran #3536
Conversation
e0eda86
to
5148288
Compare
Codecov Report
@@ Coverage Diff @@
## master #3536 +/- ##
=======================================
Coverage 58.99% 59.00%
=======================================
Files 282 284 +2
Lines 23813 23816 +3
=======================================
+ Hits 14049 14053 +4
Misses 8908 8908
+ Partials 856 855 -1 |
5148288
to
2ba210f
Compare
…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>
89c12d9
to
a00f352
Compare
Signed-off-by: Benjamin Grandfond <benjamin.grandfond@docker.com>
a00f352
to
bda03ef
Compare
@thaJeztah I finally followed up on this WIP PR. Somehow the |
while getopts ":c" opt; do | ||
case $opt in | ||
c) | ||
clean | ||
;; | ||
*) | ||
;; | ||
esac | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should reverse the option; by default, remove the go.mod
, and only if it's needed after it ran, pass an option to --keep
(or whatever) the file.
Looking at the changes, I think all (but one) calls of this script expect the go.mod
to be deleted afterwards; WDYT?
- What I did
This PR adds an option to remove the go.mod stub when executing a
./script/vendor
command. It avoidsgo build
to fail because of unconsistencies between go.mod and vendor/modules.txt files.This PR also
./scripts/vendor
to display the usage command when no command is passedclean
command called after yaml and man docs have been generated- How I did it
When the following commands are ran
go build
fails with the message- How to verify it
- Description for the changelog
Clean up
go.mod
file after vendors have been updated, validated or list outdated.- A picture of a cute animal (not mandatory but encouraged)