Compare commits

...

3 Commits

Author SHA1 Message Date
Alexander Neumann
f678c97346 Add VERSION file for 0.5.0 2017-03-11 12:34:27 +01:00
Alexander Neumann
7635feb591 Add cross-compilation to README and Manual 2017-03-09 21:24:38 +01:00
Alexander Neumann
087c2917aa Check version in build.go
Print a sensible error for Go < 1.7 (the "context" package is missing
there)
2017-03-09 21:24:30 +01:00
4 changed files with 28 additions and 2 deletions

View File

@@ -44,6 +44,16 @@ afterwards you'll find the binary in the current directory:
restic [OPTIONS] <command>
[...]
You can easily cross-compile restic for all supported platforms, just supply
the target OS and platform via the command-line options like this (for Windows
and FreeBSD respectively):
$ go run build.go --goos windows --goarch amd64
$ go run build.go --goos freebsd --goarch 386
The resulting binary is statically linked and does not require any libraries.
More documentation can be found in the [user manual](doc/Manual.md).
At the moment, the only tested compiler for restic is the official Go compiler.

View File

@@ -1 +1 @@
0.5.0-rc.1
0.5.0

View File

@@ -291,6 +291,12 @@ func (cs Constants) LDFlags() string {
}
func main() {
ver := runtime.Version()
if strings.HasPrefix(ver, "go1") && ver < "go1.7" {
fmt.Fprintf(os.Stderr, "Go version %s detected, restic requires at least Go 1.7\n", ver)
os.Exit(1)
}
buildTags := []string{}
skipNext := false

View File

@@ -1,4 +1,4 @@
Thanks for using restic. This document will give you an overview of the basic
nhanks for using restic. This document will give you an overview of the basic
functionality provided by restic.
# Installing restic
@@ -43,6 +43,16 @@ $ cd restic
$ go run build.go
```
You can easily cross-compile restic for all supported platforms, just supply
the target OS and platform via the command-line options like this (for Windows
and FreeBSD respectively):
$ go run build.go --goos windows --goarch amd64
$ go run build.go --goos freebsd --goarch 386
The resulting binary is statically linked and does not require any libraries.
At the moment, the only tested compiler for restic is the official Go compiler.
Building restic with gccgo may work, but is not supported.