Fix: Use latest release tag for install commands (#74)

* fix: Use latest release tag for install commands instead of main branch

The web install commands previously pointed to install.sh from the main branch,
which could be unstable/untested code. Now they dynamically fetch the latest
release tag from GitHub API and use that for the install script URLs.

Changes:
- Add getInstallCommands() function that takes a release tag
- Add latestRelease state that fetches from GitHub releases API
- Update all install commands to use the fetched release tag
- Fallback to 'main' if GitHub API fails

* docs: Update README and docs to use latest release tag

Also update GitHub release workflow to use the release tag dynamically.

Changes:
- README.md: Update install commands to use v0.3.0-alpha tag
- docs/INSTALL.md: Update install command to use v0.3.0-alpha tag
- .github/workflows/release.yml: Use ${{ github.ref_name }} for install URL
- Add note pointing to GitHub Releases for latest version

---------

Co-authored-by: Claude Opus <noreply@anthropic.com>
This commit is contained in:
Jatin K Malik
2026-01-26 00:45:34 -08:00
committed by GitHub
co-authored by Claude Opus
parent 0c2d269a20
commit dff07ac960
4 changed files with 44 additions and 19 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ jobs:
### Quick Install (Recommended)
```bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${{ github.ref_name }}/install.sh | bash
```
### From Source
+6 -4
View File
@@ -51,9 +51,11 @@
### One-liner Installation (Recommended)
```bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/v0.3.0-alpha/install.sh | bash
```
> **Note**: Installs the latest stable release. For the most recent version, check [GitHub Releases](https://github.com/jatinkrmalik/vocalinux/releases).
This will:
- Clone the repository to `~/.local/share/vocalinux-install`
- Install all system dependencies
@@ -66,13 +68,13 @@ This will:
**Whisper with CPU-only PyTorch (no NVIDIA GPU needed):**
```bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh | bash -s -- --whisper-cpu
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/v0.3.0-alpha/install.sh | bash -s -- --whisper-cpu
```
This installs Whisper with CPU-only PyTorch (~200MB instead of ~2.3GB). Works great for systems without NVIDIA GPU.
**For low-RAM systems (8GB or less) - VOSK only:**
```bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh | bash -s -- --no-whisper
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/v0.3.0-alpha/install.sh | bash -s -- --no-whisper
```
This skips Whisper installation entirely and configures VOSK as the default engine.
@@ -112,7 +114,7 @@ Or launch it from your application menu!
```bash
# If installed via curl:
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/uninstall.sh | bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/v0.3.0-alpha/uninstall.sh | bash
# If installed from source:
./uninstall.sh
+3 -1
View File
@@ -7,9 +7,11 @@ This guide provides detailed instructions for installing Vocalinux on Linux syst
### One-liner Installation (Recommended)
```bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/v0.3.0-alpha/install.sh | bash
```
> **Note**: Installs the latest stable release. For the most recent version, check [GitHub Releases](https://github.com/jatinkrmalik/vocalinux/releases).
That's it! The installer handles everything automatically, including Whisper AI support.
> ⏱️ **Note**: Installation takes ~5-10 minutes due to Whisper AI dependencies.
+34 -13
View File
@@ -39,21 +39,24 @@ import { atomOneDark } from "react-syntax-highlighter/dist/esm/styles/hljs";
import { useInView } from "react-intersection-observer";
// The one-liner install command (split into three lines for display)
const oneClickInstallCommand = `curl \\
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh \\
| bash`;
// Uses the latest stable release tag instead of main branch
const getInstallCommands = (latestRelease: string) => ({
oneClickInstallCommand: `curl \\
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${latestRelease}/install.sh \\
| bash`,
const oneClickInstallWhisperCpu = `curl \\
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh \\
| bash -s -- --whisper-cpu`;
oneClickInstallWhisperCpu: `curl \\
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${latestRelease}/install.sh \\
| bash -s -- --whisper-cpu`,
const oneClickInstallNoWhisper = `curl \\
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh \\
| bash -s -- --no-whisper`;
oneClickInstallNoWhisper: `curl \\
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${latestRelease}/install.sh \\
| bash -s -- --no-whisper`,
const uninstallCommand = `curl -fsSL \\
https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/uninstall.sh \\
| bash`;
uninstallCommand: `curl -fsSL \\
https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${latestRelease}/uninstall.sh \\
| bash`,
});
const FeatureCard = ({
icon,
@@ -142,10 +145,11 @@ const FadeInSection = ({
export default function HomePage() {
const [stars, setStars] = useState<number | null>(null);
const [latestRelease, setLatestRelease] = useState<string>("main"); // Default to main for safety
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
useEffect(() => {
// Fetch actual GitHub stars
// Fetch actual GitHub stars and latest release
fetch("https://api.github.com/repos/jatinkrmalik/vocalinux")
.then((res) => res.json())
.then((data) => {
@@ -157,6 +161,19 @@ export default function HomePage() {
// Fallback if API fails
setStars(null);
});
// Fetch latest release tag for stable install commands
fetch("https://api.github.com/repos/jatinkrmalik/vocalinux/releases/latest")
.then((res) => res.json())
.then((data) => {
if (data.tag_name) {
setLatestRelease(data.tag_name);
}
})
.catch(() => {
// Fallback to main if API fails
setLatestRelease("main");
});
}, []);
const navLinks = [
@@ -167,6 +184,10 @@ export default function HomePage() {
{ href: "#faq", label: "FAQ" },
];
// Get install commands based on the latest release
const installCommands = getInstallCommands(latestRelease);
const { oneClickInstallCommand, oneClickInstallWhisperCpu, oneClickInstallNoWhisper, uninstallCommand } = installCommands;
return (
<main className="min-h-screen bg-gradient-to-b from-zinc-50 to-white dark:from-zinc-900 dark:to-zinc-950">
{/* Header */}