mirror of
https://github.com/nkanaev/yarr.git
synced 2025-09-13 18:00:05 +00:00
switch assets to embed
This commit is contained in:
13
makefile
13
makefile
@@ -1,24 +1,21 @@
|
||||
VERSION=1.3
|
||||
GITHASH=$(shell git rev-parse --short=8 HEAD)
|
||||
|
||||
ASSETS = assets/javascripts/* assets/stylesheets/* assets/graphicarts/* assets/*.html
|
||||
CGO_ENABLED=1
|
||||
|
||||
GO_LDFLAGS = -s -w
|
||||
GO_LDFLAGS := $(GO_LDFLAGS) -X 'main.Version=$(VERSION)' -X 'main.GitHash=$(GITHASH)'
|
||||
|
||||
default: bundle
|
||||
default: build_default
|
||||
|
||||
server/assets.go: $(ASSETS)
|
||||
go run scripts/bundle_assets.go >/dev/null
|
||||
|
||||
bundle: server/assets.go
|
||||
|
||||
build_default: bundle
|
||||
build_default:
|
||||
mkdir -p _output
|
||||
go build -tags "sqlite_foreign_keys release" -ldflags="$(GO_LDFLAGS)" -o _output/yarr main.go
|
||||
|
||||
build_macos: bundle
|
||||
build_macos:
|
||||
set GOOS=darwin
|
||||
set GOARCH=amd64
|
||||
mkdir -p _output/macos
|
||||
@@ -26,13 +23,13 @@ build_macos: bundle
|
||||
cp artwork/icon.png _output/macos/icon.png
|
||||
go run scripts/package_macos.go -outdir _output/macos -version "$(VERSION)"
|
||||
|
||||
build_linux: bundle
|
||||
build_linux:
|
||||
set GOOS=linux
|
||||
set GOARCH=386
|
||||
mkdir -p _output/linux
|
||||
go build -tags "sqlite_foreign_keys release linux" -ldflags="$(GO_LDFLAGS)" -o _output/linux/yarr main.go
|
||||
|
||||
build_windows: bundle
|
||||
build_windows:
|
||||
set GOOS=windows
|
||||
set GOARCH=386
|
||||
mkdir -p _output/windows
|
||||
|
Reference in New Issue
Block a user