mirror of
https://github.com/rumanzo/bt2qbt.git
synced 2024-11-22 02:12:39 +01:00
47e0028bc1
* Fix structures * torrents v2 file tree interface * get files vrom both v1 and v2 torrents * fix typo * style * cleanup makefile * new test fileset with real qBittorrent files and new tests * counting files using torrent file * Handle v2 and hybryd torrents
28 lines
1.1 KiB
Makefile
28 lines
1.1 KiB
Makefile
gotag=1.18.1-bullseye
|
|
|
|
commit=$(shell git rev-parse HEAD)
|
|
|
|
dockercmd=docker run --rm -v $(CURDIR):/usr/src/bt2qbt -w /usr/src/bt2qbt
|
|
buildtags = -tags forceposix
|
|
buildenvs = -e CGO_ENABLED=0
|
|
version = 1.999
|
|
ldflags = -ldflags="-X 'main.version=$(version)' -X 'main.commit=$(commit)' -X 'main.buildImage=golang:$(gotag)'"
|
|
|
|
all: | tests build
|
|
|
|
tests:
|
|
$(dockercmd) golang:$(gotag) go test $(buildtags) ./...
|
|
|
|
build: windows linux darwin
|
|
|
|
windows:
|
|
$(dockercmd) $(buildenvs) -e GOOS=windows -e GOARCH=amd64 golang:$(gotag) go build -v $(buildtags) $(ldflags) -o bt2qbt_v$(version)_amd64.exe
|
|
$(dockercmd) $(buildenvs) -e GOOS=windows -e GOARCH=386 golang:$(gotag) go build -v $(buildtags) $(ldflags) -o bt2qbt_v$(version)_i386.exe
|
|
|
|
linux:
|
|
$(dockercmd) $(buildenvs) -e GOOS=linux -e GOARCH=amd64 golang:$(gotag) go build -v $(buildtags) $(ldflags) -o bt2qbt_v$(version)_amd64_linux
|
|
$(dockercmd) $(buildenvs) -e GOOS=linux -e GOARCH=386 golang:$(gotag) go build -v $(buildtags) $(ldflags) -o bt2qbt_v$(version)_i386_linux
|
|
|
|
darwin:
|
|
$(dockercmd) $(buildenvs) -e GOOS=darwin -e GOARCH=amd64 golang:$(gotag) go build -v $(buildtags) $(ldflags) -o bt2qbt_v$(version)_amd64_macos
|