Files
go-i2p/Makefile

76 lines
1.9 KiB
Makefile
Raw Normal View History

2024-06-25 12:03:55 -04:00
RELEASE_TAG=0.0.1
2024-06-25 12:04:18 -04:00
RELEASE_VERSION=${RELEASE_TAG}
2024-06-25 12:02:11 -04:00
RELEASE_DESCRIPTION=`cat PASTA.md`
2017-08-27 09:11:13 -04:00
REPO := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
CGO_ENABLED=0
2017-08-27 09:11:13 -04:00
ifdef GOROOT
GO = $(GOROOT)/bin/go
endif
GO ?= $(shell which go)
ifeq ($(GOOS),windows)
EXE := $(REPO)/go-i2p.exe
else
EXE := $(REPO)/go-i2p
endif
2024-10-03 23:24:12 -04:00
#check for gofumpt
check_gofumpt:
@which gofumpt > /dev/null 2>&1 || (echo "gofumpt is required but not installed. Please install it from https://github.com/mvdan/gofumpt."; exit 1)
2017-08-27 09:11:13 -04:00
build: clean $(EXE)
$(EXE):
$(GO) build --tags netgo,osusergo -v -o $(EXE)
2017-08-27 09:11:13 -04:00
2024-10-03 23:24:12 -04:00
test: check_gofumpt fmt
$(GO) test -v -failfast ./lib/common/...
2017-08-27 09:11:13 -04:00
clean:
$(GO) clean -v
fmt:
find . -name '*.go' -exec gofumpt -w {} \;
2024-06-25 11:57:52 -04:00
info:
echo "GOROOT: ${GOROOT}"
echo "GO: ${GO}"
echo "REPO: ${REPO}"
release:
2024-06-25 12:04:18 -04:00
github-release release -u go-i2p -r go-i2p -n "${RELEASE_VERSION}" -t "${RELEASE_TAG}" -d "${RELEASE_DESCRIPTION}" -p
callvis:
go-callvis -format svg -focus upgrade -group pkg,type -limit github.com/go-i2p/go-i2p github.com/go-i2p/go-i2p
godoc:
2024-10-22 22:31:19 -04:00
find lib -type d -exec bash -c "ls {}/*.go && godocdown -o ./{}/doc.md ./{}" \;
# Include test definitions
-include doc/tests/*.mk
# Define the all-tests target that runs every test suite
test-all: test-string-all \
test-mapping-all \
test-crypto-aes-all \
test-crypto-dsa-all \
test-crypto-ed25519-all \
test-crypto-elg-all \
test-crypto-hmac-all \
test-i2np-header-all \
test-i2np-build-request-all \
test-key-cert-all \
test-keys-cert-all \
test-lease-set-all \
test-noise-transport-all \
test-router-address-all \
test-router-info-all \
test-su3-all \
test-tunnel-all
#-include $(shell find doc/tests -type f -name '*.mk') #search for .mk files recursively
#test-base64-encode-decode-not-mangled:
#go test -v ./lib/common/base64 -run TestEncodeDecodeNotMangled