mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 15:10:49 +08:00
build using makefile
This commit is contained in:
8
Makefile
8
Makefile
@@ -1,6 +1,12 @@
|
|||||||
.PHONY: windows
|
.PHONY: windows
|
||||||
|
|
||||||
|
VERSION=$(shell git describe --tags --long)
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
@echo "Building for Windows..."
|
@echo "Building for Windows..."
|
||||||
go build -tags lib -ldflags="-X polaris/db.Version=$(git describe --tags --long)" -buildmode=c-shared -o ui/windows/libpolaris.dll ./cmd/binding
|
go build -tags lib -ldflags="-X polaris/db.Version=$(git describe --tags --long)" -buildmode=c-shared -o ui/windows/libpolaris.dll ./cmd/binding
|
||||||
cd ui && flutter build windows
|
cd ui && flutter build windows
|
||||||
|
|
||||||
|
polaris-web:
|
||||||
|
@echo "Building..."
|
||||||
|
CGO_ENABLED=0 go build -o polaris -ldflags="-X polaris/db.Version=$(VERSION) -X polaris/db.DefaultTmdbApiKey=$(TMDB_API_KEY)" ./cmd/polaris
|
||||||
@@ -15,7 +15,7 @@ RUN go mod download
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# 指定OS等,并go build
|
# 指定OS等,并go build
|
||||||
RUN CGO_ENABLED=0 go build -o polaris -ldflags="-X polaris/db.Version=$(git describe --tags --long) -X polaris/db.DefaultTmdbApiKey=$(echo $TMDB_API_KEY)" ./cmd/polaris
|
RUN make polaris-web
|
||||||
|
|
||||||
FROM debian:stable-slim
|
FROM debian:stable-slim
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user