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

Add support to install go from source #12

Merged
merged 3 commits into from
Jul 8, 2018

Conversation

urso
Copy link
Collaborator

@urso urso commented Jul 6, 2018

  • Building go is optional. If binaries are installed only, no source code is ever checked out or downloaded
  • Source code is checked out as bare repository into ~/.gvm/cache/go
  • To force building from source pass -b flag to use or install command (version is only build if not already installed)
  • Installer tries to get binary version first. Only if this fails we fall back to building from source (local source checkout can act as cache)
  • Version tip is always build from source
  • When using tip, the cache is only updated once per day. tip is rebuild if new commits are found in the repository
  • Introduce gvm init command. init clones the git repository or forces a git fetch.
  • Expose some more flags like target os, arch, gvm home directory, ...

Building from source requires an active go environment (use gvm to install a binary) and git for checkout. On Windows cmd /C make.bat is used for building. Other systems will run bash make.bash.

@ruflin
Copy link
Collaborator

ruflin commented Jul 6, 2018

I assume title should say Go from. source?

@urso urso changed the title Add support to install git from source Add support to install go from source Jul 6, 2018
@urso
Copy link
Collaborator Author

urso commented Jul 6, 2018

I assume title should say Go from. source?

Yeah. After typing go,git,gvm for hours in terminal it's become too easy get use the wrong one :)

Set GOROOT_BOOTSTRAP based on GOROOT
Copy link
Owner

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

This is awesome!

@andrewkroh
Copy link
Owner

I tried out gvm use tip on windows. 👍

@andrewkroh andrewkroh merged commit 13524d9 into andrewkroh:master Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants