0.8 release: document and force Go 1.3 requirement

http://camlistore.org/issue/485

Change-Id: If5304e6aafee21b77ced4b34ecef29a2a1bd6712
This commit is contained in:
mpl 2014-08-06 17:50:44 +02:00
parent f54a51dc82
commit 27102a044e
3 changed files with 16 additions and 5 deletions

17
make.go
View File

@ -453,9 +453,10 @@ func verifyCamlistoreRoot(dir string) {
}
func verifyGoVersion() {
const neededMinor = '3'
_, err := exec.LookPath("go")
if err != nil {
log.Fatalf("Go doesn't appeared to be installed ('go' isn't in your PATH). Install Go 1.1 or newer.")
log.Fatalf("Go doesn't appeared to be installed ('go' isn't in your PATH). Install Go 1.%c or newer.", neededMinor)
}
out, err := exec.Command("go", "version").Output()
if err != nil {
@ -466,10 +467,18 @@ func verifyGoVersion() {
log.Fatalf("Unexpected output while checking 'go version': %q", out)
}
version := fields[2]
switch version {
case "go1", "go1.0.1", "go1.0.2", "go1.0.3":
log.Fatalf("Your version of Go (%s) is too old. Camlistore requires Go 1.1 or later.", version)
if version == "devel" {
return
}
// this check is still needed for the "go1" case.
if len(version) < len("go1.") {
log.Fatalf("Your version of Go (%s) is too old. Camlistore requires Go 1.%c or later.", version, neededMinor)
}
minorChar := strings.TrimPrefix(version, "go1.")[0]
if minorChar >= neededMinor && minorChar <= '9' {
return
}
log.Fatalf("Your version of Go (%s) is too old. Camlistore requires Go 1.%c or later.", version, neededMinor)
}
type mirrorOpts struct {

View File

@ -30,6 +30,8 @@ is almost the same? Okay, maybe not.</p>
Or browse at Github: <a href="https://github.com/bradfitz/camlistore/tree/0.8">github.com/bradfitz/camlistore/tree/0.8</a></div>
</center>
<p>Please note that <a href="https://golang.org/dl/">Go 1.3 or newer</a> is now required for this release.</p>
<h2>Release stats</h2>
<!--
$ PREV=0.7; echo "$(git shortlog -e -s $PREV..HEAD | sed -e 's/^.*<//;s/>.*$//' | uniq | wc -l) total commiters over $(git log --format=oneline $PREV..HEAD | wc -l) commits since $PREV (), including $(i=0; git shortlog -s $PREV..HEAD | cut -c8- | fgrep ' ' | while read nm; do i=$(($i + 1)); if [ $i -ge 2 ]; then echo -n ', '; fi; echo -n "$nm"; done)."

View File

@ -5,7 +5,7 @@
<p>Or, the canonical git repo is:</p>
<pre>$ git clone https://camlistore.googlesource.com/camlistore</pre>
<p><a href="http://golang.org/doc/install">Download and install Go</a> if you don't have that installed already. Camlistore requires Go 1.1 but we recommend 1.3.</p>
<p><a href="http://golang.org/doc/install">Download and install Go</a> if you don't have that installed already. Camlistore requires <a href="https://golang.org/dl/">Go 1.3 or newer</a>.</p>
<p>Build Camlistore by running this command in the folder you downloaded or checked out:</p>