From 938a5e947593a5be9fe82c95f4d8ab23f0bbccd2 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Mon, 21 Apr 2025 15:18:28 +0800 Subject: [PATCH] feat: build with specifying target os and arch --- Makefile | 6 +++++- internal/version/VERSION | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9f41aa0e..58264d46 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ SHELL=/usr/bin/env bash +MACOS_MIN := 11.0 +TARGET_OS := darwin +TARGET_ARCH := amd64 + .DEFAULT_GOAL=help .PHONY: test @@ -17,7 +21,7 @@ bump: ## bump hrp version, e.g. make bump version=4.0.0 build: ## build hrp cli tool @echo "[info] build hrp cli tool" go mod tidy - go build -ldflags "\ + GOOS=${TARGET_OS} GOARCH=${TARGET_ARCH} go build -ldflags "\ -s -w \ -X 'github.com/httprunner/httprunner/v5/internal/version.GitCommit=$(shell git rev-parse HEAD)' \ -X 'github.com/httprunner/httprunner/v5/internal/version.GitBranch=$(shell git rev-parse --abbrev-ref HEAD)' \ diff --git a/internal/version/VERSION b/internal/version/VERSION index e2dc7fe2..4678ad5a 100644 --- a/internal/version/VERSION +++ b/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-beta-2504211439 +v5.0.0-beta-2504211518