Skip to content

Instantly share code, notes, and snippets.

@abnrk
Last active October 2, 2025 15:49
Show Gist options
  • Select an option

  • Save abnrk/90c205fe94a14a250fbdae051b648186 to your computer and use it in GitHub Desktop.

Select an option

Save abnrk/90c205fe94a14a250fbdae051b648186 to your computer and use it in GitHub Desktop.
@echo off
rem 0 = arm64
rem 1 = x64
set ARCH=1
set /a ASSET=%ARCH%*2
set VERSION_TXT=0
set /p VERSION_TXT=<version.txt
curl -H "Authorization: %GITHUB_TOKEN%" -o latest.json https://api.github.com/repos/imputnet/helium-windows/releases/latest
for /f "tokens=*" %%g in ('jq -r .[\"tag_name\"] latest.json') do (set VERSION=%%g)
for /f "tokens=*" %%g in ('jq -r .[\"assets\"][%ASSET%][\"browser_download_url\"] latest.json') do (set DOWNLOAD_URL=%%g)
if %VERSION% neq %VERSION_TXT% (
curl -o "%TEMP%\helium-installer.exe" -L %DOWNLOAD_URL%
start "" "%TEMP%\helium-installer.exe"
echo %VERSION% > version.txt
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment