[skip ci] Moved dev setup docs to its own file
This commit is contained in:
parent
6ab891fcc1
commit
d6f4829b44
24
README.md
24
README.md
|
@ -51,27 +51,3 @@ See [Featurecreep.md](Featurecreep.md) for even more! (mostly ideas, for now)
|
||||||
|
|
||||||
* [ ] [Mobile apps](https://code.vikunja.io/app) (seperate repo) *In Progress*
|
* [ ] [Mobile apps](https://code.vikunja.io/app) (seperate repo) *In Progress*
|
||||||
* [ ] [Webapp](https://code.vikunja.io/frontend) (seperate repo) *In Progress*
|
* [ ] [Webapp](https://code.vikunja.io/frontend) (seperate repo) *In Progress*
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
We use go modules to vendor libraries for Vikunja, so you'll need at least go `1.11`.
|
|
||||||
|
|
||||||
To contribute to Vikunja, fork the project and work on the master branch.
|
|
||||||
|
|
||||||
Some internal packages are referenced using their respective package URL. This can become problematic. To “trick” the Go tool into thinking this is a clone from the official repository, download the source code into `$GOPATH/code.vikunja.io/api`. Fork the Vikunja repository, it should then be possible to switch the source directory on the command line.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd $GOPATH/src/code.vikunja.io/api
|
|
||||||
```
|
|
||||||
|
|
||||||
To be able to create pull requests, the forked repository should be added as a remote to the Vikunja sources, otherwise changes can’t be pushed.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git remote rename origin upstream
|
|
||||||
git remote add origin git@git.kolaente.de:<USERNAME>/api.git
|
|
||||||
git fetch --all --prune
|
|
||||||
```
|
|
||||||
|
|
||||||
This should provide a working development environment for Vikunja. Take a look at the Makefile to get an overview about the available tasks. The most common tasks should be `make test` which will start our test environment and `make build` which will build a vikunja binary into the working directory. Writing test cases is not mandatory to contribute, but it is highly encouraged and helps developers sleep at night.
|
|
||||||
|
|
||||||
That’s it! You are ready to hack on Vikunja. Test changes, push them to the repository, and open a pull request.
|
|
||||||
|
|
38
docs/development-setup.md
Normal file
38
docs/development-setup.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Development
|
||||||
|
|
||||||
|
We use go modules to vendor libraries for Vikunja, so you'll need at least go `1.11` to use these.
|
||||||
|
If you don't intend to add new dependencies, go `1.9` and above should be fine.
|
||||||
|
|
||||||
|
To contribute to Vikunja, fork the project and work on the master branch.
|
||||||
|
|
||||||
|
### Libraries
|
||||||
|
|
||||||
|
We keep all libraries used for Vikunja around in the `vendor/` folder to still be able to build the project even if
|
||||||
|
some maintainers take their libraries down like [it happened in the past](https://github.com/jteeuwen/go-bindata/issues/5).
|
||||||
|
|
||||||
|
#### Development using go modules
|
||||||
|
|
||||||
|
If you're able to use go modules, you can clone the project wherever you want to and work from there.
|
||||||
|
|
||||||
|
However, when building or running tests, please supply the `-mod=vendor` flag to go so it builds using the
|
||||||
|
dependencies from the `vendor/` folder.
|
||||||
|
|
||||||
|
#### Development-setup without go modules
|
||||||
|
|
||||||
|
Some internal packages are referenced using their respective package URL. This can become problematic. To “trick” the Go tool into thinking this is a clone from the official repository, download the source code into `$GOPATH/code.vikunja.io/api`. Fork the Vikunja repository, it should then be possible to switch the source directory on the command line.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd $GOPATH/src/code.vikunja.io/api
|
||||||
|
```
|
||||||
|
|
||||||
|
To be able to create pull requests, the forked repository should be added as a remote to the Vikunja sources, otherwise changes can’t be pushed.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git remote rename origin upstream
|
||||||
|
git remote add origin git@git.kolaente.de:<USERNAME>/api.git
|
||||||
|
git fetch --all --prune
|
||||||
|
```
|
||||||
|
|
||||||
|
This should provide a working development environment for Vikunja. Take a look at the Makefile to get an overview about the available tasks. The most common tasks should be `make test` which will start our test environment and `make build` which will build a vikunja binary into the working directory. Writing test cases is not mandatory to contribute, but it is highly encouraged and helps developers sleep at night.
|
||||||
|
|
||||||
|
That’s it! You are ready to hack on Vikunja. Test changes, push them to the repository, and open a pull request.
|
Loading…
Reference in New Issue
Block a user