From dff07ac9606a2dada4c31905f102d7902f6a0d0d Mon Sep 17 00:00:00 2001 From: Jatin K Malik Date: Mon, 26 Jan 2026 00:45:34 -0800 Subject: [PATCH] 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 --- .github/workflows/release.yml | 2 +- README.md | 10 +++++--- docs/INSTALL.md | 4 ++- web/src/app/page.tsx | 47 +++++++++++++++++++++++++---------- 4 files changed, 44 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 646c8e4..0cfa7dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/README.md b/README.md index aded95d..c2886b2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/INSTALL.md b/docs/INSTALL.md index db9a54a..9126aff 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -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. diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx index 594c2df..e5edb7d 100644 --- a/web/src/app/page.tsx +++ b/web/src/app/page.tsx @@ -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(null); + const [latestRelease, setLatestRelease] = useState("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 (
{/* Header */}