Files
httprunner/scripts/build.sh
2022-09-21 17:27:54 +08:00

25 lines
458 B
Bash

#!/bin/bash
# build hrp cli binary for testing
# release will be triggered on github actions, see .github/workflows/release.yml
# Usage:
# $ make build
# or
# $ bash cli/scripts/build.sh
set -e
set -x
# prepare path
mkdir -p "output"
bin_path="output/hrp"
# build
# optional build tags: opencv ocr
go build -ldflags '-s -w' -tags ocr -o "$bin_path" hrp/cmd/cli/main.go
# check output and version
ls -lh "$bin_path"
chmod +x "$bin_path"
./"$bin_path" -v