feat: Updates to test homebrew
Some checks failed
CI / Run Tests (push) Failing after 2m34s

This commit is contained in:
2024-12-18 10:18:28 -05:00
parent 66e286f267
commit 529aa80c47
5 changed files with 18 additions and 11 deletions

View File

@@ -10,13 +10,16 @@ formula := "hpa"
bottle:
@brew uninstall {{formula}} || true
@brew tap {{tap}} {{tap_url}}
@brew install --build-bottle {{formula}}
@brew bottle {{formula}} --json
@brew install --build-bottle {{tap}}/{{formula}}
@brew bottle {{formula}}
bottle="$(ls *.gz)" && mv "${bottle}" "${bottle/--/-}"
# Build the command-line tool.
build mode="debug":
swift build -c {{mode}}
build configuration="debug" arch="arm64":
swift build \
--disable-sandbox \
--configuration {{configuration}} \
--arch {{arch}}
alias b := build
@@ -26,11 +29,14 @@ build-docker file="Dockerfile" tag="latest":
--file docker/{{file}} \
--tag {{docker_image_name}}:{{tag}} .
build-docker-test: (build-docker "Dockerfile.test" "test")
# Build the docker test image used for testing.
build-docker-test: (build-docker "Dockerfile.test" "test")
build-universal-binary: (build "release" "arm64") (build "release" "x86_64")
@lipo -create -output {{formula}} \
".build/arm64-apple-macosx/release/hpa" \
".build/x86_64-apple-macosx/release/hpa"
# Run tests.
test *ARGS:
swift test {{ARGS}}