加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/j3ssie/Osmedeus
克隆/下载
Makefile 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
j3ssie 提交于 2023-09-07 21:21 . Release v4.6.0
TARGET ?= osmedeus
GO ?= go
GOFLAGS ?=
VERSION := $(shell cat libs/version.go | grep 'VERSION =' | cut -d '"' -f 2)
build:
go install
go build -ldflags="-s -w" -tags netgo -trimpath -buildmode=pie -o dist/$(TARGET)
release:
go install
@echo "==> Clean up old builds"
rm -rf ./dist/* ~/myGit/premium-$(TARGET)-base/dist/* ~/org-$(TARGET)/$(TARGET)-base/dist/*
@echo "==> building binaries for for mac intel"
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -tags netgo -trimpath -buildmode=pie -o dist/$(TARGET)
zip -9 -j dist/$(TARGET)-macos-amd64.zip dist/$(TARGET) && rm -rf ./dist/$(TARGET)
@echo "==> building binaries for for mac M1 chip"
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -tags netgo -trimpath -buildmode=pie -o dist/$(TARGET)
zip -9 -j dist/$(TARGET)-macos-arm64.zip dist/$(TARGET)&& rm -rf ./dist/$(TARGET)
@echo "==> building binaries for linux intel build on mac"
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -tags netgo -trimpath -buildmode=pie -o dist/$(TARGET)
zip -j dist/$(TARGET)-linux.zip dist/$(TARGET)&& rm -rf ./dist/$(TARGET)
cp dist/* ~/myGit/premium-$(TARGET)-base/dist/
cp dist/* ~/org-$(TARGET)/$(TARGET)-base/dist/
@echo "==> Generating metadata info"
$(TARGET) update --gen dist/public.json
mv dist/$(TARGET)-macos-amd64.zip dist/$(TARGET)-$(VERSION)-macos-amd64.zip
mv dist/$(TARGET)-macos-arm64.zip dist/$(TARGET)-$(VERSION)-macos-arm64.zip
mv dist/$(TARGET)-linux.zip dist/$(TARGET)-$(VERSION)-linux.zip
run:
$(GO) $(GOFLAGS) run *.go
fmt:
$(GO) $(GOFLAGS) fmt ./...; \
echo "Done."
test:
$(GO) $(GOFLAGS) test ./... -v%
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化