Skip to content

Commit 79f7fd4

Browse files
committed
fix(installer): include prover in prerelease bundle
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 9667118 commit 79f7fd4

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎.github/workflows/release-tag.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,11 @@ jobs:
545545
release/openshell-aarch64-apple-darwin.tar.gz
546546
release/openshell-gateway-aarch64-apple-darwin.tar.gz
547547
release/openshell-driver-vm-aarch64-apple-darwin.tar.gz
548+
release/openshell-prover-aarch64-apple-darwin.tar.gz
548549
release/openshell.rb
549550
release/openshell-checksums-sha256.txt
550551
release/openshell-gateway-checksums-sha256.txt
552+
release/openshell-prover-checksums-sha256.txt
551553
retention-days: 90
552554
if-no-files-found: error
553555

‎install.sh‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ HOMEBREW_FORMULA_NAME="openshell"
2222
HOMEBREW_CLI_ASSET="openshell-aarch64-apple-darwin.tar.gz"
2323
HOMEBREW_GATEWAY_ASSET="openshell-gateway-aarch64-apple-darwin.tar.gz"
2424
HOMEBREW_DRIVER_VM_ASSET="openshell-driver-vm-aarch64-apple-darwin.tar.gz"
25+
HOMEBREW_PROVER_ASSET="openshell-prover-aarch64-apple-darwin.tar.gz"
2526
BREAKING_RELEASE_VERSION="0.0.37"
2627
LINUX_PACKAGE_GLIBC_MIN_VERSION="2.28"
2728
UPGRADE_NOTICE_ACK="${OPENSHELL_ACK_BREAKING_UPGRADE:-}"
@@ -400,8 +401,8 @@ resolve_latest_prerelease_tag() {
400401
/^v[0-9]+\.[0-9]+\.[0-9]+-pre\.[1-9][0-9]*$/ {
401402
tag = $0
402403
sub(/^v/, "", tag)
403-
split(tag, version_parts, "-pre\\.")
404-
split(version_parts[1], core, "\\.")
404+
split(tag, version_parts, "-pre[.]")
405+
split(version_parts[1], core, "[.]")
405406
sequence = version_parts[2] + 0
406407
407408
if (!found || core[1] + 0 > major ||
@@ -839,7 +840,7 @@ patch_prerelease_homebrew_formula_urls() {
839840
_formula_file="$1"
840841
[ -n "$RELEASE_ASSET_DIR" ] || return 0
841842

842-
for _asset in "$HOMEBREW_CLI_ASSET" "$HOMEBREW_GATEWAY_ASSET" "$HOMEBREW_DRIVER_VM_ASSET"; do
843+
for _asset in "$HOMEBREW_CLI_ASSET" "$HOMEBREW_GATEWAY_ASSET" "$HOMEBREW_DRIVER_VM_ASSET" "$HOMEBREW_PROVER_ASSET"; do
843844
if [ ! -f "${RELEASE_ASSET_DIR}/${_asset}" ]; then
844845
error "prerelease artifact is missing the required macOS asset: ${_asset}"
845846
fi
@@ -852,6 +853,7 @@ patch_prerelease_homebrew_formula_urls() {
852853
-e "s#${_release_asset_url}/${HOMEBREW_CLI_ASSET}#${_local_asset_url}/${HOMEBREW_CLI_ASSET}#g" \
853854
-e "s#${_release_asset_url}/${HOMEBREW_GATEWAY_ASSET}#${_local_asset_url}/${HOMEBREW_GATEWAY_ASSET}#g" \
854855
-e "s#${_release_asset_url}/${HOMEBREW_DRIVER_VM_ASSET}#${_local_asset_url}/${HOMEBREW_DRIVER_VM_ASSET}#g" \
856+
-e "s#${_release_asset_url}/${HOMEBREW_PROVER_ASSET}#${_local_asset_url}/${HOMEBREW_PROVER_ASSET}#g" \
855857
"$_formula_file" >"$_patched_file"
856858
mv "$_patched_file" "$_formula_file"
857859
}

‎python/openshell/release_formula_test.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_generate_homebrew_formula_uses_channel_urls_and_exact_version(
6060
assert 'sha256 "' + "b" * 64 + '"' in formula
6161
assert (
6262
"https://github.com/NVIDIA/OpenShell/releases/download/"
63-
"v0.0.10/openshell-prover-aarch64-apple-darwin.tar.gz"
63+
"v0.1.0-pre.3/openshell-prover-aarch64-apple-darwin.tar.gz"
6464
) in formula
6565
assert 'sha256 "' + "e" * 64 + '"' in formula
6666
assert 'resource("openshell-prover").stage' in formula

‎tasks/scripts/test-install-sh.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,17 +228,18 @@ if [ "$(cat "$downloaded_checksum")" != "checksums" ]; then
228228
exit 1
229229
fi
230230

231-
for asset in "$HOMEBREW_CLI_ASSET" "$HOMEBREW_GATEWAY_ASSET" "$HOMEBREW_DRIVER_VM_ASSET"; do
231+
for asset in "$HOMEBREW_CLI_ASSET" "$HOMEBREW_GATEWAY_ASSET" "$HOMEBREW_DRIVER_VM_ASSET" "$HOMEBREW_PROVER_ASSET"; do
232232
: >"${RELEASE_ASSET_DIR}/${asset}"
233233
done
234234
prerelease_formula="${tmpdir}/openshell.rb"
235235
printf '%s\n' \
236236
" url \"${GITHUB_URL}/releases/download/${RELEASE_TAG}/${HOMEBREW_CLI_ASSET}\"" \
237237
" url \"${GITHUB_URL}/releases/download/${RELEASE_TAG}/${HOMEBREW_GATEWAY_ASSET}\"" \
238238
" url \"${GITHUB_URL}/releases/download/${RELEASE_TAG}/${HOMEBREW_DRIVER_VM_ASSET}\"" \
239+
" url \"${GITHUB_URL}/releases/download/${RELEASE_TAG}/${HOMEBREW_PROVER_ASSET}\"" \
239240
>"$prerelease_formula"
240241
patch_prerelease_homebrew_formula_urls "$prerelease_formula"
241-
for asset in "$HOMEBREW_CLI_ASSET" "$HOMEBREW_GATEWAY_ASSET" "$HOMEBREW_DRIVER_VM_ASSET"; do
242+
for asset in "$HOMEBREW_CLI_ASSET" "$HOMEBREW_GATEWAY_ASSET" "$HOMEBREW_DRIVER_VM_ASSET" "$HOMEBREW_PROVER_ASSET"; do
242243
if ! grep -Fq "file://${RELEASE_ASSET_DIR}/${asset}" "$prerelease_formula"; then
243244
echo "FAIL: prerelease formula did not use local asset ${asset}" >&2
244245
exit 1

0 commit comments

Comments
 (0)