Skip to content
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

Change base image cache location on mac/windows, add methods for getting XDG config location #2218

Merged
merged 10 commits into from
Jan 9, 2020

Conversation

TadCordle
Copy link
Contributor

@TadCordle TadCordle commented Jan 7, 2020

Fixes #2216.

Adds methods for retrieving the config directory:

  • Linux: $HOME/.config/google-cloud-tools-java/jib/
  • Mac: $HOME/Library/Preferences/Google/Jib/
  • Windows: %LOCALAPPDATA%\Google\Jib\Config

Also changes the cache directory on Mac/Windows to the following:

Before:

  • Mac: $HOME/Library/Application Support/google-cloud-tools-java/jib/
  • Win: %LOCALAPPDATA/google-cloud-tools-java/jib/

After:

  • Mac: $HOME/Library/Caches/Google/Jib/
  • Win: %LOCALAPPDATA\Google\Jib\Cache\

Linux is still at $HOME/.cache/google-cloud-tools-java/jib/. Will need to update documentation to help users migrate the old cache over to the new location.

@chanseokoh
Copy link
Member

If we have to do this, should we also change the Linux directory to be consistent, from .../google-cloud-tools-java/jib to .../google/jib? The majority of Java developers are on Windows (in generally, may not be true for developers building images), so may not be a big deal. And if so, maybe we should just go with ../google/jib in all lower cases for both Windows and Mac? But I'm fine in either way.

@TadCordle TadCordle changed the title Change base image cache location on mac/windows Change base image cache location on mac/windows, add methods for getting XDG config location Jan 7, 2020
@TadCordle
Copy link
Contributor Author

TadCordle commented Jan 7, 2020

Consistency would certainly make this easier. I don't really care where it ends up either way personally. That said, it sounds like there are some conventions people like to follow on different platforms (see #2211 (review))

@chanseokoh
Copy link
Member

Ah, okay. Forget changing google-cloud-tools-java/jib then.

@TadCordle TadCordle merged commit cfbec81 into master Jan 9, 2020
@TadCordle TadCordle deleted the i2216-change-cache-location branch January 9, 2020 20:04
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.

Change cache location on Mac/Windows
3 participants