Skip to content

Commit fb03ad6

Browse files
committed
ci: release AppImage, pin appimagetool, drop JS eval in logs
- Attach the AppImage artifact to draft releases in ci-tag.yml (it was built but never published). - Pin appimagetool to 1.9.1 and verify its SHA256, instead of the unpinned 'continuous' build, matching the action SHA-pinning policy. - Replace the inline JS eval in LogsTab with a named openshock.scrollToBottom helper loaded from wwwroot/js/openshock.js.
1 parent d8bc0eb commit fb03ad6

6 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,13 @@ jobs:
235235
ARCH=x86_64
236236
APPDIR=AppDir
237237
238-
# Download appimagetool (runs without FUSE via --appimage-extract-and-run)
238+
# Download appimagetool, pinned to a tagged release and verified by checksum
239+
# (runs without FUSE via --appimage-extract-and-run).
240+
APPIMAGETOOL_VERSION=1.9.1
241+
APPIMAGETOOL_SHA256=ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0
239242
curl -fsSL -o appimagetool \
240-
"https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage"
243+
"https://github.com/AppImage/appimagetool/releases/download/${APPIMAGETOOL_VERSION}/appimagetool-${ARCH}.AppImage"
244+
echo "${APPIMAGETOOL_SHA256} appimagetool" | sha256sum -c -
241245
chmod +x appimagetool
242246
243247
# Assemble the AppDir from committed assets + the published self-contained app

.github/workflows/ci-tag.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
name: OpenShock Desktop Photino Linux
8080
path: artifacts/photino-linux/
8181

82+
- name: Download Linux AppImage
83+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
84+
with:
85+
name: OpenShock Desktop AppImage
86+
path: artifacts/
87+
8288
- name: Download Module Base
8389
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
8490
with:
@@ -100,4 +106,5 @@ jobs:
100106
files: |
101107
artifacts/OpenShock_Desktop_Setup.exe
102108
artifacts/OpenShock.Desktop.Photino.Linux.zip
109+
artifacts/OpenShock_Desktop-*.AppImage
103110
artifacts/OpenShock.Desktop.Module.Base.zip

Desktop/Ui/Pages/Dash/Tabs/LogsTab.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
_shouldScroll = false;
105105
try
106106
{
107-
await JS.InvokeVoidAsync("eval", "(()=>{var e=document.getElementById('console-body');if(e)e.scrollTop=e.scrollHeight;})()");
107+
await JS.InvokeVoidAsync("openshock.scrollToBottom", "console-body");
108108
}
109109
catch { /* ignore */ }
110110
}

Desktop/wwwroot/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet"/>
1212
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
1313
<script src="js/tailwindcss-browser.js"></script>
14+
<script src="js/openshock.js"></script>
1415
</head>
1516

1617
<body>

Desktop/wwwroot/js/openshock.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Small JS interop helpers for OpenShock Desktop.
2+
window.openshock = window.openshock || {};
3+
4+
// Scrolls the element with the given id to the bottom. Used by the logs console
5+
// for autoscroll. No-op if the element is not present.
6+
window.openshock.scrollToBottom = function (elementId) {
7+
const el = document.getElementById(elementId);
8+
if (el) el.scrollTop = el.scrollHeight;
9+
};

Desktop/wwwroot/photino.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet"/>
1212
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
1313
<script src="js/tailwindcss-browser.js"></script>
14+
<script src="js/openshock.js"></script>
1415
</head>
1516

1617
<body>

0 commit comments

Comments
 (0)