Skip to content

Remove duplication around Go modules settings #2580

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

Merged
merged 1 commit into from
Jul 31, 2019

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Jul 31, 2019

Signed-off-by: David Gageot [email protected]

@codecov
Copy link

codecov bot commented Jul 31, 2019

Codecov Report

Merging #2580 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted Files Coverage Δ
pkg/skaffold/jib/jib.go 78.49% <0%> (+1.07%) ⬆️

@@ -39,6 +38,11 @@ ifeq "$(strip $(VERSION))" ""
override VERSION = $(shell git describe --always --tags --dirty)
endif

# Force using Go Modules and always read the dependencies from
# the `vendor` folder.
export GO111MODULE = on
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause issues if you are compiling another go project in the same terminal. will defer it to @nkubala if he had it this way for specific reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. The variable will be set only for the Makefile.
Also, with linux, a process can't change the env variables of a parent -> The makefile can't change the env variables of the terminal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be fine, but worst case scenario you can always just unset the variable if you're gonna build something else in that terminal. also this would only be an issue for go versions 1.11 and older.

Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Defer it to @nkubala for approval.

@@ -39,6 +38,11 @@ ifeq "$(strip $(VERSION))" ""
override VERSION = $(shell git describe --always --tags --dirty)
endif

# Force using Go Modules and always read the dependencies from
# the `vendor` folder.
export GO111MODULE = on
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be fine, but worst case scenario you can always just unset the variable if you're gonna build something else in that terminal. also this would only be an issue for go versions 1.11 and older.

@dgageot dgageot merged commit 1df9667 into GoogleContainerTools:master Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants