fix: run ocr alone without opencv

This commit is contained in:
debugtalk
2022-09-21 17:50:08 +08:00
parent be41ec8fd7
commit 9004f84791
11 changed files with 42 additions and 24 deletions

View File

@@ -4,8 +4,10 @@
# Usage:
# $ make build
# $ make build tags=ocr
# or
# $ bash cli/scripts/build.sh
# $ bash scripts/build.sh
# $ bash scripts/build.sh ocr
set -e
set -x
@@ -14,9 +16,15 @@ set -x
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
tags=$1
# build
if [ -z "$tags" ]; then
go build -ldflags '-s -w' -o "$bin_path" hrp/cmd/cli/main.go
else
go build -ldflags '-s -w' -tags "$tags" -o "$bin_path" hrp/cmd/cli/main.go
fi
# check output and version
ls -lh "$bin_path"

View File

@@ -3,9 +3,9 @@
# release will be triggered on github actions, see .github/workflows/release.yml
# Usage:
# $ make bump version=v0.5.2
# $ make bump version=v4.3.0
# or
# $ bash cli/scripts/bump_version.sh v0.5.2
# $ bash scripts/bump_version.sh v4.3.0
set -e