Gb version 0.4.3 has been relased

gb version 0.4.3 adds the ability to automatically download released dependencies.

Briefly summarised, if a dependency is listed in $PROJECT/depfile but is not present in the users’ cache, gb will attempt to fetch it.

NOTE: currently only dependencies hosted on github are fetched. Vanity import paths, bitbucket, private git repos, etc. are not yet supported.

$PROJECT/depfile syntax

A valid depfile lives at $PROJECT/depfile. It contains one or more lines of text. The format of the line is:

name key=value [key=value]...

name is an import path representing a remote repository. The only supported key is version, a valid version value is any SemVer 2.0.0 value. This version must match a release tag in the format

v<semver version>

For example:

github.com/pkg/profile version=1.1.0

Will fetch the github release tagged v1.1.0.

Sample $PROJECT/depfile

Elements can be separated by whitespace. Lines that do not begin with a letter or number are ignored. This provides a simple mechanism for commentary.

# some comment
github.com/pkg/profile version=1.1.0

; some other comment
// third kind of comment
 lines starting with blank lines are also ignored
github.com/pkg/errors version=0.7.0

Please leave feadback on this feature via the issue tracker.

For more details, please consult the 0.4.3 release notes available on Github.

5 Likes

This is very neat and I’m happy to see it, with initial limitations and all. I think gb is the last, best hope for peace in the Go build ecosystem…

4 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.