craft your forge, build your project, grow your community freely
1# SPDX-FileCopyrightText: 2025 Romain Maneschi <romain@gitroot.dev>
2#
3# SPDX-License-Identifier: EUPL-1.2
4 5VERSION=`git describe --exact-match --tags HEAD 2> /dev/null`
6COMMIT=`git rev-parse HEAD`
7PLUGINS_DIR=$(shell find app/plugins/ -maxdepth 1 -mindepth 1 -type d)
8MAKEFLAGS += --no-print-directory
910build:
11 cd app/server/ && go build -race -ldflags "-X main.version=${VERSION} -X main.commit=${COMMIT}" -o ../../gitroot
1213build-plugins:
14 for dir in $(PLUGINS_DIR) ; do \
15 make -C $$dir build; \
16 done
1718test:
19 cd app/libs/golang/glob && go test -race ./...
20 cd app/libs/golang/plugin && go test -race ./...
21 for dir in $(PLUGINS_DIR) ; do \
22 make -C $$dir test; \
23 done
24 cd app/server/ && go test -race ./...
2526testsuite: build-plugins
27 cd app/testsuite && ./runtest.sh && ./proxy.sh
2829testall: test testsuite
3031force-build-plugins: clean-plugins build-plugins
3233clean-plugins:
34 for dir in $(PLUGINS_DIR) ; do \
35 make -C $$dir clean; \
36 done
3738clean: clean-plugins
39 cd app/server/ && go clean
40 rm -rf gitroot