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))))
|
2024-09-09 20:13:20 -04:00
|
|
|
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):
|
2024-09-09 20:13:20 -04:00
|
|
|
$(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
|
2024-07-05 18:12:58 -04:00
|
|
|
$(GO) test -v -failfast ./lib/common/...
|
2017-08-27 09:11:13 -04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(GO) clean -v
|
2024-02-05 10:42:57 -05:00
|
|
|
|
|
|
|
fmt:
|
2024-08-28 18:32:42 -04:00
|
|
|
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
|
2024-08-26 16:21:54 -04:00
|
|
|
|
|
|
|
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
|