2023-10-19 15:08:48 +02:00
|
|
|
SHELL := /bin/bash
|
|
|
|
|
2024-01-05 11:12:27 +01:00
|
|
|
test: go-test keygen-test
|
|
|
|
|
|
|
|
go-test:
|
2019-02-03 20:56:58 +01:00
|
|
|
go clean -testcache
|
|
|
|
go test -cover -v ./...
|
|
|
|
|
|
|
|
watch:
|
2022-09-05 12:40:58 +02:00
|
|
|
go run -mod=readonly github.com/cortesi/modd/cmd/modd@latest
|
2019-02-03 20:56:58 +01:00
|
|
|
|
2023-10-19 15:08:48 +02:00
|
|
|
release: tidy .env
|
|
|
|
( set -o allexport && source .env && set +o allexport && script/release )
|
|
|
|
|
|
|
|
.env:
|
|
|
|
cp .env.dist .env
|
2019-04-09 11:20:47 +02:00
|
|
|
|
2019-02-03 20:56:58 +01:00
|
|
|
tidy:
|
|
|
|
go mod tidy
|
|
|
|
|
|
|
|
lint:
|
2022-09-05 12:40:58 +02:00
|
|
|
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0 run --tests=false --enable-all
|
2019-02-03 20:56:58 +01:00
|
|
|
|
2019-02-22 17:35:49 +01:00
|
|
|
bin/keygen:
|
2022-09-05 10:56:41 +02:00
|
|
|
CGO_ENABLED=0 go build -o bin/keygen ./cmd/keygen
|
2019-02-03 20:56:58 +01:00
|
|
|
|
2023-10-19 15:08:48 +02:00
|
|
|
.PHONY: test lint doc sequence-diagram bin/keygen release
|
|
|
|
|
|
|
|
gitea-release: .mktools tools/gitea-release/bin/gitea-release.sh release
|
|
|
|
GITEA_RELEASE_PROJECT="go-http-peering" \
|
|
|
|
GITEA_RELEASE_ORG="Cadoles" \
|
|
|
|
GITEA_RELEASE_BASE_URL="https://forge.cadoles.com" \
|
|
|
|
GITEA_RELEASE_VERSION="$(MKT_PROJECT_VERSION)" \
|
|
|
|
GITEA_RELEASE_NAME="$(MKT_PROJECT_VERSION)" \
|
|
|
|
GITEA_RELEASE_COMMITISH_TARGET="$(GIT_VERSION)" \
|
|
|
|
GITEA_RELEASE_IS_DRAFT="false" \
|
|
|
|
GITEA_RELEASE_BODY="" \
|
|
|
|
GITEA_RELEASE_ATTACHMENTS="$$(find release -type f -name '*.tar.gz')" \
|
|
|
|
tools/gitea-release/bin/gitea-release.sh
|
|
|
|
|
2024-01-05 11:12:27 +01:00
|
|
|
keygen-test: tools/bash_unit/bin/bash_unit
|
|
|
|
tools/bash_unit/bin/bash_unit misc/bash_unit/keygen_test.sh
|
|
|
|
|
|
|
|
tools/bash_unit/bin/bash_unit:
|
|
|
|
mkdir -p tools/bash_unit/bin
|
|
|
|
cd tools/bash_unit/bin && bash <(curl -s https://raw.githubusercontent.com/pgrange/bash_unit/master/install.sh)
|
|
|
|
|
2023-10-19 15:08:48 +02:00
|
|
|
.PHONY: mktools
|
|
|
|
mktools:
|
|
|
|
rm -rf .mktools
|
|
|
|
curl -k -q https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/install.sh | $(SHELL)
|
|
|
|
|
|
|
|
.mktools:
|
|
|
|
$(MAKE) mktools
|
|
|
|
|
|
|
|
-include .mktools/*.mk
|