This commit is contained in:
22
justfile
22
justfile
@@ -2,10 +2,23 @@ product := "bump-version"
|
|||||||
docker_image := "bump-version"
|
docker_image := "bump-version"
|
||||||
docker_tag := "test"
|
docker_tag := "test"
|
||||||
|
|
||||||
|
tap_url := "https://git.housh.dev/michael/homebrew-formula"
|
||||||
|
tap := "michael/formula"
|
||||||
|
formula := "bump-version"
|
||||||
|
release_base_url := "https://git.housh.dev/michael/bump-version/archive"
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
default:
|
default:
|
||||||
@just --list
|
@just --list
|
||||||
|
|
||||||
|
# Build and bottle homebrew formula.
|
||||||
|
bottle:
|
||||||
|
@brew uninstall {{formula}} || true
|
||||||
|
@brew tap {{tap}} {{tap_url}}
|
||||||
|
@brew install --build-bottle {{tap}}/{{formula}}
|
||||||
|
@brew bottle {{formula}}
|
||||||
|
bottle="$(ls *.gz)" && mv "${bottle}" "${bottle/--/-}"
|
||||||
|
|
||||||
# Build locally.
|
# Build locally.
|
||||||
build configuration="debug":
|
build configuration="debug":
|
||||||
@swift build \
|
@swift build \
|
||||||
@@ -42,3 +55,12 @@ test-docker: build-docker
|
|||||||
|
|
||||||
test-docker-without-building:
|
test-docker-without-building:
|
||||||
@docker run --rm {{docker_image}}:{{docker_tag}} swift test
|
@docker run --rm {{docker_image}}:{{docker_tag}} swift test
|
||||||
|
|
||||||
|
# Get the sha256 sum of the release and copy to clipboard.
|
||||||
|
get-release-sha prefix="": (build "release")
|
||||||
|
version=$(.build/release/hpa --version) && \
|
||||||
|
url="{{release_base_url}}/{{prefix}}${version}.tar.gz" && \
|
||||||
|
sha=$(curl "$url" | shasum -a 256) && \
|
||||||
|
stripped="${sha% *}" && \
|
||||||
|
echo "$stripped" | pbcopy && \
|
||||||
|
echo "Copied sha to clipboard: $stripped"
|
||||||
|
|||||||
Reference in New Issue
Block a user