Files
httprunner/hrp/scripts/build.sh
debugtalk 48e26354a7 feat #11: release hrp cli binaries automatically with github actions
feat #20: add Makefile for running unittest and building hrp cli binary
2021-11-19 17:38:31 +08:00

24 lines
406 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 hrp/scripts/build.sh
set -e
set -x
# prepare path
mkdir -p "output"
bin_path="output/hrp"
# build
go build -ldflags '-s -w' -o "$bin_path" hrp/main.go
# check output and version
ls -lh "$bin_path"
chmod +x "$bin_path"
./"$bin_path" -v