2019-10-22 19:55:43 +00:00
|
|
|
.PHONY: all test
|
|
|
|
|
2023-01-18 04:42:10 +00:00
|
|
|
COMMIT := $(shell git rev-parse --short HEAD)
|
2024-01-29 09:50:57 +00:00
|
|
|
TD_COMMIT := "5bbfc1cf5dab94f82e02f3430ded7241d4653551"
|
2024-06-01 20:43:38 +00:00
|
|
|
VERSION := "v1.9.6"
|
2023-08-01 22:36:27 +00:00
|
|
|
MAKEOPTS := "-j4"
|
2023-01-18 04:42:10 +00:00
|
|
|
|
2019-10-22 16:36:54 +00:00
|
|
|
all:
|
2024-03-29 11:39:10 +00:00
|
|
|
mkdir -p release
|
|
|
|
go build -ldflags "-X main.commit=${COMMIT}" -o release/telegabber
|
2019-10-22 19:55:43 +00:00
|
|
|
|
|
|
|
test:
|
2023-06-03 04:20:03 +00:00
|
|
|
go test -v ./config ./ ./telegram ./xmpp ./xmpp/gateway ./persistence ./telegram/formatter ./badger
|
2019-10-29 01:23:57 +00:00
|
|
|
|
|
|
|
lint:
|
|
|
|
$(GOPATH)/bin/golint ./...
|
2023-08-01 22:36:27 +00:00
|
|
|
|
|
|
|
build_indocker:
|
|
|
|
docker build --build-arg "TD_COMMIT=${TD_COMMIT}" --build-arg "VERSION=${VERSION}" --build-arg "MAKEOPTS=${MAKEOPTS}" --output=release --target binaries .
|
2024-03-29 11:39:10 +00:00
|
|
|
|
|
|
|
build_indocker_staging:
|
|
|
|
DOCKER_BUILDKIT=1 docker build --build-arg "TD_COMMIT=${TD_COMMIT}" --build-arg "MAKEOPTS=${MAKEOPTS}" --network host --output=release --target binaries -f staging.Dockerfile .
|
2024-04-09 23:08:37 +00:00
|
|
|
|
|
|
|
build_tdlib:
|
|
|
|
DOCKER_BUILDKIT=1 docker build --build-arg "TD_COMMIT=${TD_COMMIT}" --build-arg "MAKEOPTS=${MAKEOPTS}" --output=tdlib --target binaries -f tdlib.Dockerfile .
|