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 your 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.
14 15### Prerequisites
16 17All this tools need to be available in your path:
18 19- [git](https://git-scm.com/): the git client to be able to pull and push code
20- [bash](https://www.gnu.org/software/bash/manual/bash.html): a lot of scripts are written to be executed in bash
21- [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
22 23Then you have two choices:
24 25- [mise](https://mise.jdx.dev/): a dev env manager in which a simple `mise install` will set all requierements
26 27Or install manually (look into [mise.toml](https://gitroot.dev/gitroot/worktree/mise.toml) for forgotten tools):
28 29- [golang](https://go.dev/): GitRoot is written in go [see rationals](./doc/rationales/rationale_golang.md) if you want to know why
30- [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
31- [nodejs/npm](https://nodejs.org): to compile plugin in [assemblyscript](https://www.assemblyscript.org/)
32 33### Installing
34 35Clone the code `git clone ssh://gitroot.dev/` and init your git client for this repository `.gitroot/init.sh`.
36 37> Don't want to run unknown sh? See [manually init client](./doc/how-tos/manual_init_client.md).
38 39Don'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.
40 41> More on the [users and branches workflow](./doc/technicals/users_file.md) in GitRoot.
42 43## Build
44 45To build GitRoot use `make build` and it will generate a `gitroot` binary in the root of the project.
46 47Launch 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/`.
48 49For more details on usage, please read the [doc](./doc/index.md).
50 51## Running the tests
52 53GitRoot has differents kind of tests:
54 55- unit tests in go files, execute them with `make test` 56- integration tests in sh files, they will create data directory in `/tmp`, execute them with `make testsuite` 57 58To run all in one command: `make testall` 59 60## Deployment
61 62See the [documentation](./doc/tutorials/deploy_instance.md) to deploy an instance.
63 64## Contributing
65 66Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code
67of conduct, and the process for submitting code to us.
68 69## Versioning
70 71We use [Semantic Versioning](http://semver.org/) for versioning. For the versions available, see the [changelog](./CHANGELOG.md).
72 73## Authors
74 75As in any GitRoot repository, find contributors in [.gitroot/users.yml](./.gitroot/users.yml).
76 77## Release
78 79To release a version of GitRoot:
80 81- make the directory for issues `mkdir issues/close/v0.1.0` 82- 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' _ {} \;` 83- update [changelog](./CHANGELOG.md) with date, version, next and last
84- commit `git add . && git commit -m ":bookmark: v0.1.0"` 85- create a tag: `git tag -a v0.1.0 -m "Version 0.1.0"` 86- build the binary: `make build` 87- get binary infos: `./releases/0.1.0/gitroot-0.1.0-darwin-amd64 --version` 88- update [changelog](./CHANGELOG.md) with commit info and add next section
89- commit `git add . && git commit -m ":sparkles: start next"` 90- 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"` 91- git push (don't push tag we don't care about that, only commit is important)
92 93## License
94 95This 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:
96 97- app/server: EUPL-1.2
98- app/libs: MIT
99- app/plugin: EUPL-1.2
100- doc: CC-BY-SA-4.0
101102So 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).
103104For more accurate information, check the [REUSE.toml](./REUSE.toml) and/or individual files.