GitRoot

craft your forge, build your project, grow your community freely
 1<!--
 2SPDX-FileCopyrightText: 2025 Romain Maneschi <romain@gitroot.dev>
 3
 4SPDX-License-Identifier: EUPL-1.2
 5-->
 6
 7# GitRoot
 8
 9GitRoot is a tiny yet powerfull git forge. Download one binary, launch it and you have a forge. Install plugins and only your imagination is the limit.
10
11## Getting Started
12
13These instructions will give you a copy of the project up and running on
14your local machine for development and testing purposes. See [gitroot.dev](https://gitroot.dev) to understand the project itself and the [documentation](./doc/index.md) to discover how to use it.
15
16### Prerequisites
17
18All this tools need to be available in your path:
19
20- [git](https://git-scm.com/): the git client to be able to pull and push code
21- [bash](https://www.gnu.org/software/bash/manual/bash.html): a lot of scripts are written to be executed in bash
22- [make](https://www.gnu.org/software/make/): to simplify the call to the scripts we have a makefile in the root directory and some others in sub-directories
23- [golang](https://go.dev/): GitRoot is written in go [see rationals](./doc/rationales/rationale_golang.md) if you want to know why
24- [tinygo](https://tinygo.org/): first plugins are written in golang and compiled thanks to tinygo, in the future a lot of others languages will comes
25
26### Installing
27
28Clone the code `git clone ssh://gitroot.dev/` and init your git client for this repository `.gitroot/init.sh`.
29
30> Don't want to run unknown sh? See [manually init client](./doc/how-tos/manual_init_client.md).
31
32Don't forget to make a branch before coding `git checkout -b myWork`. As GitRoot allow anybody to push a branch (if no one as already do == a branch name need to be unique) you don't need to register or to fork something. Branch, code, commit and push, is what you need to do.
33
34> More on the [users and branches workflow](./doc/technicals/users_file.md) in GitRoot.
35
36## Build
37
38To build GitRoot use `make build` and it will generate a `gitroot` binary in the root of the project.
39
40Launch it with `./gitroot -data="./data"`, your forge is accessible on `git clone ssh://127.0.0.1:4545/` or by opening `http://127.0.0.1:4546/`.
41
42For more details on usage, please read the [doc](./doc/index.md).
43
44## Running the tests
45
46GitRoot has differents kind of tests:
47
48- unit tests in go files, execute them with `make test`
49- integration tests in sh files, they will create data directory in `/tmp`, execute them with `make testsuite`
50
51To run all in one command: `make testall`
52
53## Deployment
54
55See the [documentation](./doc/tutorials/deploy_instance.md) to deploy an instance.
56
57## Contributing
58
59Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code
60of conduct, and the process for submitting code to us.
61
62## Versioning
63
64We use [Semantic Versioning](http://semver.org/) for versioning. For the versions available, see the [changelog](./CHANGELOG.md).
65
66## Authors
67
68As in any GitRoot repository, find contributors in [.gitroot/users.yml](./.gitroot/users.yml).
69
70## Release
71
72To release a version of GitRoot:
73
74- make the directory for issues `mkdir issues/close/v0.1.0`
75- move all issues from `issues/close` to `issues/close/v0.1.0` with `find issues/close/. -maxdepth 1 \( ! -type d \) -exec sh -c 'mv  "$@" issues/close/v0.1.0' _ {} \;`
76- update [changelog](./CHANGELOG.md) with date, version, next and last
77- commit `git add . && git commit -m ":bookmark: v0.1.0"`
78- create a tag: `git tag -a v0.1.0 -m "Version 0.1.0"`
79- build the binary: `make build`
80- get binary infos: `./gitroot --version`
81- update [changelog](./CHANGELOG.md) with commit info and add next section
82- commit `git add . && git commit -m ":sparkles: start next"`
83- release binary: `scp gitroot-0.1.0 gitroot.dev` and update last `ssh gitroot.dev "rm -f gitroot-last && cp gitroot-0.1.0 gitroot-last"`
84- git push (don't push tag we don't care about that, only commit is important)
85
86## License
87
88This project is licensed under multiple licences. GitRoot follow [spdx](https://spdx.dev/) convention, so you can find all licences in `licences` directory. Each file contain it's own licence, but here is a brief summary as of May 2025:
89
90- app/server: EUPL-1.2
91- app/libs: MIT
92- app/plugin: EUPL-1.2
93- doc: CC-BY-SA-4.0
94
95So you can develop a plugin in any licence you want. To encourage that, libs to help you build a plugin are MIT. All the code EUPL will stay EUPL and any modification should be republied. See more on [rationals about EUPL](./doc/rationales/rationale_licence.md).
96
97For more accurate information, check the [REUSE.toml](./REUSE.toml) and/or individual files.