Skip to content

Commit 9b10175

Browse files
committed
fix(release): remove dev dry-run scaffolding
1 parent 7c83c53 commit 9b10175

4 files changed

Lines changed: 27 additions & 51 deletions

File tree

.github/workflows/release-dev.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ on:
44
push:
55
branches: [main]
66
workflow_dispatch:
7-
inputs:
8-
publish-dev-release:
9-
description: "Update :dev images, the dev GitHub release, Helm chart, and wheel publishing"
10-
required: false
11-
type: boolean
12-
default: false
137

148
permissions:
159
contents: write
@@ -83,7 +77,6 @@ jobs:
8377
tag-ghcr-dev:
8478
name: Tag GHCR Images as Dev
8579
needs: [build-gateway, build-supervisor]
86-
if: github.event_name == 'push' || inputs['publish-dev-release']
8780
runs-on: linux-amd64-cpu8
8881
timeout-minutes: 10
8982
steps:
@@ -834,7 +827,6 @@ jobs:
834827
cat release/openshell.rb
835828
836829
- name: Attest VM driver artifacts
837-
if: github.event_name == 'push' || inputs['publish-dev-release']
838830
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4
839831
with:
840832
subject-path: |
@@ -843,7 +835,6 @@ jobs:
843835
release/openshell-driver-vm-aarch64-apple-darwin.tar.gz
844836
845837
- name: Prune managed assets from dev release
846-
if: github.event_name == 'push' || inputs['publish-dev-release']
847838
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
848839
with:
849840
script: |
@@ -892,15 +883,13 @@ jobs:
892883
core.info(`Summary: deleted=${deleted}, skipped=${skipped}`);
893884
894885
- name: Move dev tag
895-
if: github.event_name == 'push' || inputs['publish-dev-release']
896886
run: |
897887
git config user.name "github-actions[bot]"
898888
git config user.email "github-actions[bot]@users.noreply.github.com"
899889
git tag -fa dev -m "Latest Dev" "${GITHUB_SHA}"
900890
git push --force origin dev
901891
902892
- name: Create / update GitHub Release
903-
if: github.event_name == 'push' || inputs['publish-dev-release']
904893
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
905894
with:
906895
name: OpenShell Development Build
@@ -939,18 +928,9 @@ jobs:
939928
release/openshell-gateway-checksums-sha256.txt
940929
release/openshell-sandbox-checksums-sha256.txt
941930
942-
- name: Upload dry-run dev release artifacts
943-
if: github.event_name == 'workflow_dispatch' && !inputs['publish-dev-release']
944-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
945-
with:
946-
name: dev-release-dry-run-artifacts
947-
path: release/
948-
retention-days: 5
949-
950931
release-helm:
951932
name: Release Helm Chart (OCI, dev)
952933
needs: [tag-ghcr-dev]
953-
if: github.event_name == 'push' || inputs['publish-dev-release']
954934
runs-on: ubuntu-latest
955935
timeout-minutes: 10
956936
permissions:
@@ -968,7 +948,6 @@ jobs:
968948
trigger-wheel-publish:
969949
name: Trigger Wheel Publish
970950
needs: [compute-versions, release-dev]
971-
if: github.event_name == 'push' || inputs['publish-dev-release']
972951
runs-on: [self-hosted, nv]
973952
timeout-minutes: 10
974953
steps:

install.sh

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -169,38 +169,30 @@ ldd_version_output() {
169169
}
170170

171171
detect_glibc_version() {
172-
_getconf_output="$(getconf_gnu_libc_version 2>/dev/null || true)"
173-
case "$_getconf_output" in
174-
glibc\ [0-9]*.[0-9]*)
175-
printf '%s\n' "${_getconf_output#glibc }"
176-
return 0
177-
;;
178-
*[Mm][Uu][Ss][Ll]* | *[Aa][Ll][Pp][Ii][Nn][Ee]*)
179-
return 2
180-
;;
181-
esac
182-
183172
_ldd_output="$(ldd_version_output 2>&1 || true)"
184173
case "$_ldd_output" in
185174
*[Mm][Uu][Ss][Ll]* | *[Aa][Ll][Pp][Ii][Nn][Ee]*)
186175
return 2
187176
;;
188177
esac
189178

190-
# uv's installer parses the glibc version from the first ldd line's final field.
191-
_ldd_version="$(printf '%s\n' "$_ldd_output" | awk 'FNR == 1 { print $NF; exit }')"
192-
case "$_ldd_version" in
193-
[0-9]*.[0-9]*)
194-
;;
195-
*)
196-
_ldd_version=""
197-
;;
198-
esac
179+
_ldd_version="$(printf '%s\n' "$_ldd_output" | awk 'FNR == 1 && match($NF, /^[0-9]+\.[0-9]+/) { print substr($NF, RSTART, RLENGTH); exit }')"
199180
if [ -n "$_ldd_version" ]; then
200181
printf '%s\n' "$_ldd_version"
201182
return 0
202183
fi
203184

185+
_getconf_output="$(getconf_gnu_libc_version 2>/dev/null || true)"
186+
case "$_getconf_output" in
187+
glibc\ [0-9]*.[0-9]*)
188+
printf '%s\n' "${_getconf_output#glibc }"
189+
return 0
190+
;;
191+
*[Mm][Uu][Ss][Ll]* | *[Aa][Ll][Pp][Ii][Nn][Ee]*)
192+
return 2
193+
;;
194+
esac
195+
204196
return 1
205197
}
206198

tasks/scripts/stage-prebuilt-binaries.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,15 @@ patch_workspace_version() {
122122

123123
cargo_toml="${ROOT}/Cargo.toml"
124124
cargo_toml_backup="$(mktemp)"
125-
cargo_toml_patched="$(mktemp)"
126125
cp "$cargo_toml" "$cargo_toml_backup"
127126
restore_cargo_toml=1
128-
sed -E '/^\[workspace\.package\]/,/^\[/{s/^version[[:space:]]*=[[:space:]]*".*"/version = "'"${OPENSHELL_CARGO_VERSION}"'"/}' "$cargo_toml" > "$cargo_toml_patched"
129-
mv "$cargo_toml_patched" "$cargo_toml"
127+
sed -i -E '/^\[workspace\.package\]/,/^\[/{s/^version[[:space:]]*=[[:space:]]*".*"/version = "'"${OPENSHELL_CARGO_VERSION}"'"/}' "$cargo_toml"
130128
}
131129

132130
restore_workspace_version() {
133131
if [[ "${restore_cargo_toml:-0}" == "1" ]]; then
134132
cp "$cargo_toml_backup" "$cargo_toml"
135133
rm -f "$cargo_toml_backup"
136-
rm -f "${cargo_toml_patched:-}"
137134
fi
138135
}
139136

tasks/scripts/test-install-sh.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export OPENSHELL_INSTALL_SH_TEST=1
1616

1717
assert_glibc_preflight_passes() {
1818
local name=$1
19-
local getconf_output=$2
19+
local ldd_output=$2
2020

21-
if ! (export OPENSHELL_TEST_GETCONF_OUTPUT="$getconf_output"; require_linux_package_glibc) >"$out" 2>"$err"; then
21+
if ! (export OPENSHELL_TEST_GETCONF_UNAVAILABLE=1 OPENSHELL_TEST_LDD_OUTPUT="$ldd_output"; require_linux_package_glibc) >"$out" 2>"$err"; then
2222
echo "FAIL: ${name}" >&2
2323
cat "$err" >&2 || true
2424
exit 1
@@ -45,7 +45,8 @@ assert_glibc_preflight_fails() {
4545
}
4646

4747
setup_glibc_228() {
48-
export OPENSHELL_TEST_GETCONF_OUTPUT="glibc 2.28"
48+
export OPENSHELL_TEST_GETCONF_UNAVAILABLE=1
49+
export OPENSHELL_TEST_LDD_OUTPUT="ldd (GNU libc) 2.28"
4950
}
5051

5152
setup_missing_glibc() {
@@ -54,6 +55,7 @@ setup_missing_glibc() {
5455
}
5556

5657
setup_getconf_musl() {
58+
export OPENSHELL_TEST_LDD_UNAVAILABLE=1
5759
export OPENSHELL_TEST_GETCONF_OUTPUT="musl libc"
5860
}
5961

@@ -63,10 +65,16 @@ setup_ldd_musl() {
6365
}
6466

6567
assert_glibc_preflight_passes "glibc 2.31 passes" "glibc 2.31"
66-
assert_glibc_preflight_passes "glibc 2.35 passes" "glibc 2.35"
68+
assert_glibc_preflight_passes "glibc 2.35 passes" "ldd (GNU libc) 2.35"
69+
70+
if ! (export OPENSHELL_TEST_LDD_UNAVAILABLE=1 OPENSHELL_TEST_GETCONF_OUTPUT="glibc 2.35"; require_linux_package_glibc) >"$out" 2>"$err"; then
71+
echo "FAIL: getconf glibc fallback passes" >&2
72+
cat "$err" >&2 || true
73+
exit 1
74+
fi
6775

68-
if ! (export OPENSHELL_TEST_GETCONF_UNAVAILABLE=1 OPENSHELL_TEST_LDD_OUTPUT="ldd (GNU libc) 2.35"; require_linux_package_glibc) >"$out" 2>"$err"; then
69-
echo "FAIL: ldd glibc fallback passes" >&2
76+
if ! (export OPENSHELL_TEST_LDD_OUTPUT="not ldd" OPENSHELL_TEST_GETCONF_OUTPUT="glibc 2.35"; require_linux_package_glibc) >"$out" 2>"$err"; then
77+
echo "FAIL: unparseable ldd output falls back to getconf" >&2
7078
cat "$err" >&2 || true
7179
exit 1
7280
fi

0 commit comments

Comments
 (0)