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.
1011## Getting Started
1213These 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.
1516### Prerequisites
1718All this tools need to be available in your path:
1920- [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
2526### Installing
2728Clone the code `git clone ssh://gitroot.dev/` and init your git client for this repository `.gitroot/init.sh`.
2930> Don't want to run unknown sh? See [manually init client](./doc/how-tos/manual_init_client.md).
3132Don'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.
3334> More on the [users and branches workflow](./doc/technicals/users_file.md) in GitRoot.
3536## Build
3738To build GitRoot use `make build` and it will generate a `gitroot` binary in the root of the project.
3940Launch 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/`.
4142For more details on usage, please read the [doc](./doc/index.md).
4344## Running the tests
4546GitRoot has differents kind of tests:
4748- 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`5051To run all in one command: `make testall`5253## Deployment
5455See the [documentation](./doc/tutorials/deploy_instance.md) to deploy an instance.
5657## Contributing
5859Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code
60of conduct, and the process for submitting code to us.
6162## Versioning
6364We use [Semantic Versioning](http://semver.org/) for versioning. For the versions available, see the [changelog](./CHANGELOG.md).
6566## Authors
6768As in any GitRoot repository, find contributors in [.gitroot/users.yml](./.gitroot/users.yml).
6970## Release
7172To release a version of GitRoot:
7374- 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)
8586## License
8788This 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:
8990- app/server: EUPL-1.2
91- app/libs: MIT
92- app/plugin: EUPL-1.2
93- doc: CC-BY-SA-4.0
9495So 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).
9697For more accurate information, check the [REUSE.toml](./REUSE.toml) and/or individual files.