fix: Install script now uses release tag instead of main branch (#75)
Problem: Even though the website fetched install.sh from a specific release tag, the script itself would clone the repository from main branch, installing potentially unstable/untested code. Solution: - Add --tag parameter to install.sh to specify which release to install - Default to v0.3.0-alpha (latest stable) instead of main - Clone the specific tag using 'git clone --branch <tag>' - Update website to pass --tag parameter with fetched release Changes: - install.sh: Add --tag parameter, default to v0.3.0-alpha, clone specific tag - web/src/app/page.tsx: Pass --tag=<version> to install script This ensures users install the exact release version they intended, not whatever code is currently on main branch. Co-authored-by: Claude Opus <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
co-authored by
Claude Opus
parent
dff07ac960
commit
4d8f029c8f
+12
-4
@@ -70,6 +70,10 @@ while [[ $# -gt 0 ]]; do
|
||||
NON_INTERACTIVE="yes" # Skip the prompt
|
||||
shift
|
||||
;;
|
||||
--tag=*)
|
||||
INSTALL_TAG="${1#*=}"
|
||||
shift
|
||||
;;
|
||||
-y|--yes)
|
||||
NON_INTERACTIVE="yes"
|
||||
shift
|
||||
@@ -85,6 +89,7 @@ while [[ $# -gt 0 ]]; do
|
||||
echo " --with-whisper Install Whisper AI support with GPU/CUDA (included by default)"
|
||||
echo " --whisper-cpu Install Whisper with CPU-only PyTorch (smaller download, works on low-RAM)"
|
||||
echo " --no-whisper VOSK-only install (skips Whisper entirely, uses VOSK as default)"
|
||||
echo " --tag=TAG Install specific release tag (default: v0.3.0-alpha)"
|
||||
echo " -y, --yes Non-interactive mode (accept defaults)"
|
||||
echo " --help Show this help message"
|
||||
exit 0
|
||||
@@ -106,6 +111,9 @@ print_info "Vocalinux Installer"
|
||||
print_info "=============================="
|
||||
echo ""
|
||||
|
||||
# Default to installing from latest stable release instead of main branch
|
||||
INSTALL_TAG="${INSTALL_TAG:-v0.3.0-alpha}"
|
||||
|
||||
# Check if running from within the vocalinux repo or remotely (via curl)
|
||||
REPO_URL="https://github.com/jatinkrmalik/vocalinux.git"
|
||||
INSTALL_DIR=""
|
||||
@@ -117,18 +125,18 @@ if [ -f "setup.py" ] || [ -f "pyproject.toml" ]; then
|
||||
print_info "Running from local repository: $INSTALL_DIR"
|
||||
else
|
||||
# Running remotely (e.g., via curl | bash)
|
||||
print_info "Cloning Vocalinux repository..."
|
||||
print_info "Installing Vocalinux version: ${INSTALL_TAG}"
|
||||
INSTALL_DIR="$HOME/.local/share/vocalinux-install"
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
|
||||
if [ -d "$INSTALL_DIR/.git" ]; then
|
||||
print_info "Updating existing clone..."
|
||||
cd "$INSTALL_DIR"
|
||||
git fetch origin main
|
||||
git reset --hard origin/main
|
||||
git fetch origin "$INSTALL_TAG"
|
||||
git reset --hard "origin/$INSTALL_TAG"
|
||||
else
|
||||
rm -rf "$INSTALL_DIR"
|
||||
git clone --depth 1 "$REPO_URL" "$INSTALL_DIR" || {
|
||||
git clone --depth 1 --branch "$INSTALL_TAG" "$REPO_URL" "$INSTALL_DIR" || {
|
||||
print_error "Failed to clone Vocalinux repository"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -39,19 +39,19 @@ 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)
|
||||
// Uses the latest stable release tag instead of main branch
|
||||
// Uses the latest stable release tag and passes it to the script
|
||||
const getInstallCommands = (latestRelease: string) => ({
|
||||
oneClickInstallCommand: `curl \\
|
||||
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${latestRelease}/install.sh \\
|
||||
| bash`,
|
||||
| bash -s -- --tag=${latestRelease}`,
|
||||
|
||||
oneClickInstallWhisperCpu: `curl \\
|
||||
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${latestRelease}/install.sh \\
|
||||
| bash -s -- --whisper-cpu`,
|
||||
| bash -s -- --tag=${latestRelease} --whisper-cpu`,
|
||||
|
||||
oneClickInstallNoWhisper: `curl \\
|
||||
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${latestRelease}/install.sh \\
|
||||
| bash -s -- --no-whisper`,
|
||||
| bash -s -- --tag=${latestRelease} --no-whisper`,
|
||||
|
||||
uninstallCommand: `curl -fsSL \\
|
||||
https://raw.githubusercontent.com/jatinkrmalik/vocalinux/${latestRelease}/uninstall.sh \\
|
||||
|
||||
Reference in New Issue
Block a user