2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-26 14:56:29 +00:00

Update documentation

This commit is contained in:
Alexander Neumann 2017-07-23 14:32:31 +02:00
parent c5a72971fe
commit 05500dc5f8

View File

@ -72,51 +72,23 @@ repo:
$ mkdir -p "$GOPATH/src/github.com/restic" $ mkdir -p "$GOPATH/src/github.com/restic"
$ cd "$GOPATH/src/github.com/restic" $ cd "$GOPATH/src/github.com/restic"
$ git clone https://github.com/restic/restic $ git clone https://github.com/restic/restic
For development you need the build tool [`gb`](https://getgb.io), it can be
installed by running the following command:
$ go get github.com/constabulary/gb/...
The repository contains two directories with code: `src/` contains the code
written for restic, whereas `vendor/` contains copies of libraries restic
depends on. The libraries are managed with the `gb vendor` command.
Just clone the repository, `cd` to it and run `gb build` to build the binary:
$ git clone https://github.com/restic/restic
$ cd restic $ cd restic
$ gb build
[...] You can then build restic as follows:
$ bin/restic version
$ go build ./cmd/restic
$ ./restic version
restic compiled manually restic compiled manually
compiled at unknown time with go1.7 compiled with go1.8.3 on linux/amd64
The following commands can be used to run all the tests: The following commands can be used to run all the tests:
$ gb test $ go test ./cmd/... ./internal/...
ok github.com/restic/restic 8.174s
[...]
If you want to run your tests on Linux, OpenBSD or FreeBSD, you can use The repository contains two sets of directories with code: `cmd/` and
[vagrant](https://www.vagrantup.com/) with the provided `Vagrantfile` to `internal/` contain the code written for restic, whereas `vendor/` contains
quickly set up VMs and run the tests, e.g.: copies of libraries restic depends on. The libraries are managed with the
[`dep`](https://github.com/golang/dep) tool.
$ vagrant up freebsd
[...]
$ vagrant ssh freebsd -c 'cd restic/restic; go test -v ./...'
[...]
The default `go` tool can also be used by setting the environment variable
`GOPATH` to the following value while being in the top level directory in the
git repository:
$ export GOPATH=$PWD:$PWD/vendor
The file `.envrc` allows automatic `GOPATH` configuration with
[direnv](https://direnv.net/), inspect the file and then allow automatic
configuration by running `direnv allow`.
Providing Patches Providing Patches
================= =================