1 Star 0 Fork 14

o沧-桑o / orly

forked from 楠木 / orly 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 867 Bytes
一键复制 编辑 原始数据 按行查看 历史
楠木 提交于 2020-01-28 11:49 . all: add makefile; modification on fonts
VERSION := $(shell git describe --tags --dirty --always)
BUILD := $(shell date +%FT%T%z)
.PHONY: config clean dir all frontend rly fonts covers
all: clean config frontend fonts covers rly
dir:
mkdir -p bin && \
mkdir -p bin/web && \
mkdir -p bin/fonts && \
mkdir -p bin/cover-images
clean:
rm -rf bin
config: dir
cd cmd/rly && \
go run genconfig.go config.go && \
cp config_example.toml $(PWD)/bin
frontend: dir
cd frontend && \
yarn install && yarn build && \
cp -r dist/* $(PWD)/bin/web
rly: rly.bin
fonts: dir
cd assets && \
tar -xf fonts.tar.xz --skip-old-files -C $(PWD)/bin/fonts
covers: dir
cd assets && \
tar -xf cover-images.tar.xz --skip-old-files -C $(PWD)/bin/cover-images
%.bin: dir
cd cmd/$* && \
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.Version=$(VERSION) -X main.BuildDate=$(BUILD)" && \
cp $* $(PWD)/bin/$*
Go
1
https://gitee.com/flying_miku/orly.git
git@gitee.com:flying_miku/orly.git
flying_miku
orly
orly
master

搜索帮助