Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package zvm for openSUSE:Factory checked in at 2026-04-04 19:05:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/zvm (Old) and /work/SRC/openSUSE:Factory/.zvm.new.21863 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zvm" Sat Apr 4 19:05:35 2026 rev:9 rq:1344365 version:0.8.14 Changes: -------- --- /work/SRC/openSUSE:Factory/zvm/zvm.changes 2026-03-27 06:54:05.777329928 +0100 +++ /work/SRC/openSUSE:Factory/.zvm.new.21863/zvm.changes 2026-04-04 19:07:04.392278301 +0200 @@ -1,0 +2,7 @@ +Fri Mar 27 13:35:55 UTC 2026 - Lucas Mulling <[email protected]> + +- Update to 0.8.14: + * feat: add build tag to disable automatic updates + * Remove patch disable-auto-upgrade.patch + +------------------------------------------------------------------- @@ -4 +11 @@ -- update to 0.8.13: +- Update to 0.8.13: @@ -6 +13 @@ -- update to 0.8.12: +- Update to 0.8.12: Old: ---- disable-auto-upgrade.patch zvm-0.8.13.tar.gz New: ---- zvm-0.8.14.tar.gz ----------(Old B)---------- Old: * feat: add build tag to disable automatic updates * Remove patch disable-auto-upgrade.patch ----------(Old E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ zvm.spec ++++++ --- /var/tmp/diff_new_pack.m0KyjP/_old 2026-04-04 19:07:05.144309134 +0200 +++ /var/tmp/diff_new_pack.m0KyjP/_new 2026-04-04 19:07:05.148309299 +0200 @@ -17,15 +17,13 @@ Name: zvm -Version: 0.8.13 +Version: 0.8.14 Release: 0 Summary: Easily install/upgrade between different versions of Zig License: MIT URL: https://github.com/tristanisham/zvm Source: https://github.com/tristanisham/zvm/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: vendor.tar.xz -# PATCH-FIX-UPSTREAM: Disable auto upgrade features -Patch0: disable-auto-upgrade.patch BuildRequires: golang(API) >= 1.22 Requires: tar @@ -45,6 +43,7 @@ -ldflags="-s -w" \ -mod=vendor \ -buildmode=pie \ + -tags noAutoUpgrades \ -v %install ++++++ vendor.tar.xz ++++++ ++++ 5369 lines of diff (skipped) ++++++ zvm-0.8.13.tar.gz -> zvm-0.8.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/.github/ISSUE_TEMPLATE/bug_report.md new/zvm-0.8.14/.github/ISSUE_TEMPLATE/bug_report.md --- old/zvm-0.8.13/.github/ISSUE_TEMPLATE/bug_report.md 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/.github/ISSUE_TEMPLATE/bug_report.md 2026-03-26 22:04:15.000000000 +0100 @@ -2,8 +2,8 @@ name: Bug report about: Create a report to help us improve title: "[BUG]" -labels: '' -assignees: '' +labels: "" +assignees: "" --- **Describe the bug** A clear and concise description of what the bug is. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/.github/ISSUE_TEMPLATE/feature_request.md new/zvm-0.8.14/.github/ISSUE_TEMPLATE/feature_request.md --- old/zvm-0.8.13/.github/ISSUE_TEMPLATE/feature_request.md 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/.github/ISSUE_TEMPLATE/feature_request.md 2026-03-26 22:04:15.000000000 +0100 @@ -1,9 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' +title: "" +labels: "" +assignees: "" --- **Is your feature request related to a problem? Please describe.** A clear and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/.github/workflows/daily_canary.yml new/zvm-0.8.14/.github/workflows/daily_canary.yml --- old/zvm-0.8.13/.github/workflows/daily_canary.yml 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/.github/workflows/daily_canary.yml 2026-03-26 22:04:15.000000000 +0100 @@ -2,7 +2,7 @@ on: schedule: - - cron: '0 14 * * *' # Runs at 9:00 AM EST (14:00 UTC) every day + - cron: "0 14 * * *" # Runs at 9:00 AM EST (14:00 UTC) every day workflow_dispatch: jobs: @@ -31,25 +31,25 @@ run: | # Add current directory to PATH so we can call ./zvm easily export PATH=$PWD:$PATH - + echo "Installing Zig master..." ./zvm install master - + # Verify the file exists (sanity check) # Note: On Windows this path might differ slightly, but zvm manages it. # We will trust zvm ls or running zig directly. - + echo "Verifying installation..." ./zvm ls - + # Use the installed version ./zvm use master - + # Test if 'zig' command works # We need to source the env or add the zvm bin path manually for the test session # The standard path is usually ~/.zvm/bin export PATH="$HOME/.zvm/bin:$PATH" - + echo "Checking Zig version..." zig version @@ -58,7 +58,7 @@ run: | export PATH=$PWD:$PATH export PATH="$HOME/.zvm/bin:$PATH" - + echo "Installing Zig 0.13.0 (Example Stable)..." ./zvm install 0.13.0 ./zvm use 0.13.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/CONTRIBUTING.MD new/zvm-0.8.14/CONTRIBUTING.MD --- old/zvm-0.8.13/CONTRIBUTING.MD 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/CONTRIBUTING.MD 2026-03-26 22:04:15.000000000 +0100 @@ -26,19 +26,34 @@ ## AI -Regardless of your thoughts on generative AI, as [Linus Torvalds said](https://www.youtube.com/watch?v=mfv0V1SxbNA), "The genie is out of the bottle". -ZVM itself employs Gemini Code Assist in this repo to assist with evaluating new PRs for vulnerabilies, styling defects, and other issues that can be address by the pull request's author. -It does not make any decisions or write any code without manual review and approval. - -If you are submitting a pull request to ZVM that was written with generative AI, I ask you to follow these rules, or have your P.R. rejected and future contributions sidelined. - -### 1. Know what the AI wrote. -If you cannot explain, identify, or defend the choices and code written by your AI agent, you should not be making pull request. ZVM is a tool installed on thousands of computers. That is, in part, due to the trust our users -have in the quality and security of the application. **I do not take that lightly**. AI cannot be held responsible for decisions it makes, but you will be. -This is not a vibe-coded app, and contributors are expected to have the requisite skills that, if AI were not to exist, write the code themselves, or at least write it in a language they are already familiar with. +Regardless of your thoughts on generative AI, as +[Linus Torvalds said](https://www.youtube.com/watch?v=mfv0V1SxbNA), "The genie +is out of the bottle". ZVM itself employs Gemini Code Assist in this repo to +assist with evaluating new PRs for vulnerabilies, styling defects, and other +issues that can be address by the pull request's author. It does not make any +decisions or write any code without manual review and approval. + +If you are submitting a pull request to ZVM that was written with generative AI, +I ask you to follow these rules, or have your P.R. rejected and future +contributions sidelined. + +### 1. Know what the AI wrote. + +If you cannot explain, identify, or defend the choices and code written by your +AI agent, you should not be making pull request. ZVM is a tool installed on +thousands of computers. That is, in part, due to the trust our users have in the +quality and security of the application. **I do not take that lightly**. AI +cannot be held responsible for decisions it makes, but you will be. This is not +a vibe-coded app, and contributors are expected to have the requisite skills +that, if AI were not to exist, write the code themselves, or at least write it +in a language they are already familiar with. ### 2. Clearly Disclose AI usage -P.R.s that are written with Generative AI and that do not disclose it will not be merged. If it is found out that generative AI was used and not disclosed in a pull request, your future contributions will be sidelined. + +P.R.s that are written with Generative AI and that do not disclose it will not +be merged. If it is found out that generative AI was used and not disclosed in a +pull request, your future contributions will be sidelined. ### 3. Do not add AI metadata in your P.R. -P.R.s that add AI metadata such as `AGENT.md` or `Claude.md` will not be merged. + +P.R.s that add AI metadata such as `AGENT.md` or `Claude.md` will not be merged. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/GEMINI.md new/zvm-0.8.14/GEMINI.md --- old/zvm-0.8.13/GEMINI.md 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/GEMINI.md 2026-03-26 22:04:15.000000000 +0100 @@ -1,59 +1,79 @@ # Project Context: ZVM (Zig Version Manager) ## Project Overview -`zvm` is a cross-platform version manager for the Zig programming language, written in Go. It allows users to install, switch between, and manage multiple versions of Zig (including master/nightly builds and tagged releases) and ZLS (Zig Language Server). It is designed to be simple, fast, and standalone, with minimal dependencies (only `tar` on Unix systems). + +`zvm` is a cross-platform version manager for the Zig programming language, +written in Go. It allows users to install, switch between, and manage multiple +versions of Zig (including master/nightly builds and tagged releases) and ZLS +(Zig Language Server). It is designed to be simple, fast, and standalone, with +minimal dependencies (only `tar` on Unix systems). ## Architecture & Tech Stack -* **Language:** Go (v1.25.3) -* **Build System:** Deno (`build.ts`) is used for cross-platform compilation and bundling, though standard `go build` works for local development. -* **Key Libraries:** - * `github.com/urfave/cli/v3`: CLI application framework. - * `github.com/charmbracelet/log` & `lipgloss`: Styled terminal output and logging. - * `github.com/jedisct1/go-minisign`: Verifying Zig signatures. + +- **Language:** Go (v1.25.3) +- **Build System:** Deno (`build.ts`) is used for cross-platform compilation and + bundling, though standard `go build` works for local development. +- **Key Libraries:** + - `github.com/urfave/cli/v3`: CLI application framework. + - `github.com/charmbracelet/log` & `lipgloss`: Styled terminal output and + logging. + - `github.com/jedisct1/go-minisign`: Verifying Zig signatures. ### Core Components -* **`main.go`**: The application entry point. Configures the CLI commands (`install`, `use`, `ls`, `clean`, `upgrade`, `vmu`) and flags. -* **`cli/` Package**: Contains the core business logic. - * **`config.go`**: Handles initialization (`Initialize`), configuration loading, and the `ZVM` struct definition. - * **`install.go`**: Logic for downloading, verifying (shasum/minisign), and extracting Zig versions. - * **`use.go`**: Manages switching versions (symlinking). - * **`ls.go`**: Listing installed and available remote versions. - * **`settings.go`**: Manages `~/.zvm/settings.json`. - * **`upgrade.go`**: Self-upgrade functionality. + +- **`main.go`**: The application entry point. Configures the CLI commands + (`install`, `use`, `ls`, `clean`, `upgrade`, `vmu`) and flags. +- **`cli/` Package**: Contains the core business logic. + - **`config.go`**: Handles initialization (`Initialize`), configuration + loading, and the `ZVM` struct definition. + - **`install.go`**: Logic for downloading, verifying (shasum/minisign), and + extracting Zig versions. + - **`use.go`**: Manages switching versions (symlinking). + - **`ls.go`**: Listing installed and available remote versions. + - **`settings.go`**: Manages `~/.zvm/settings.json`. + - **`upgrade.go`**: Self-upgrade functionality. ## Building and Running ### Prerequisites -* Go 1.25+ -* Deno (optional, for release builds) + +- Go 1.25+ +- Deno (optional, for release builds) ### Development Commands -* **Run locally:** - ```bash - go run main.go [command] - ``` -* **Build locally:** - ```bash - go build -o zvm main.go - ``` -* **Run Tests:** - ```bash - go test ./... - ``` -* **Cross-Platform Build (Release):** - ```bash - deno run -A build.ts - ``` - This script compiles `zvm` for Windows, Linux, macOS, *BSD, and Solaris, creating artifacts in the `build/` directory. + +- **Run locally:** + ```bash + go run main.go [command] + ``` +- **Build locally:** + ```bash + go build -o zvm main.go + ``` +- **Run Tests:** + ```bash + go test ./... + ``` +- **Cross-Platform Build (Release):** + ```bash + deno run -A build.ts + ``` + This script compiles `zvm` for Windows, Linux, macOS, *BSD, and Solaris, + creating artifacts in the `build/` directory. ## Development Conventions -* **Formatting:** Strict adherence to `go fmt`. -* **Naming:** use `camelCase` for all variables, functions, and fields. -* **Visibility:** Default to private (lowercase) for functions/variables unless they *must* be exported for external package use. -* **Environment:** The application expects to operate within `~/.zvm` (or `ZVM_PATH`) and uses `ZVM_INSTALL` and `PATH` modifications to function correctly. + +- **Formatting:** Strict adherence to `go fmt`. +- **Naming:** use `camelCase` for all variables, functions, and fields. +- **Visibility:** Default to private (lowercase) for functions/variables unless + they _must_ be exported for external package use. +- **Environment:** The application expects to operate within `~/.zvm` (or + `ZVM_PATH`) and uses `ZVM_INSTALL` and `PATH` modifications to function + correctly. ## Key Files -* `main.go`: CLI definition and entry point. -* `cli/config.go`: Main `ZVM` struct and initialization logic. -* `build.ts`: Release build script (TypeScript/Deno). -* `CONTRIBUTING.MD`: Contribution guidelines and coding standards. + +- `main.go`: CLI definition and entry point. +- `cli/config.go`: Main `ZVM` struct and initialization logic. +- `build.ts`: Release build script (TypeScript/Deno). +- `CONTRIBUTING.MD`: Contribution guidelines and coding standards. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/README.md new/zvm-0.8.14/README.md --- old/zvm-0.8.13/README.md 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/README.md 2026-03-26 22:04:15.000000000 +0100 @@ -21,7 +21,6 @@ <a href="https://polar.sh/tristanisham"><picture><source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/embed/subscribe.svg?org=tristanisham&label=Subscribe&darkmode"><img alt="Subscribe on Polar" src="https://polar.sh/embed/subscribe.svg?org=tristanisham&label=Subscribe"></picture></a> - # Installing ZVM ZVM lives entirely in `$HOME/.zvm` on all platforms it supports. Inside of the @@ -35,10 +34,17 @@ If you don't want to use `ZVM_INSTALL` (like you already have ZVM in a place you like), then ZVM will update the exact executable you've called `upgrade` from. +All installation scripts hosted on `www.zvm.app` are identical to, and are +automatically synced with their respective copies on GitHub. + +``` +www.zvm.app/install.sh === ./install.sh +``` + # Linux, BSD, MacOS, *nix ```sh -curl https://raw.githubusercontent.com/tristanisham/zvm/master/install.sh | bash +curl https://www.zvm.app/install.sh | bash ``` <!-- This script will **automatically append** ZVM's required environment variables (see below) to `~/.profile` or `~/.bashrc`. --> @@ -56,13 +62,13 @@ ## PowerShell ```ps1 -irm https://raw.githubusercontent.com/tristanisham/zvm/master/install.ps1 | iex +irm "https://www.zvm.app/install.ps1" | iex ``` ## Command Prompt ```cmd -powershell -c "irm https://raw.githubusercontent.com/tristanisham/zvm/master/install.ps1 | iex" +powershell -c "irm https://www.zvm.app/install.ps1 | iex" ``` # If You Have a Valid Version of Go Installed @@ -76,6 +82,21 @@ Please grab the [latest release](https://github.com/tristanisham/zvm/releases/latest). +Alternatively, you can build the app by cloning the repository and running + +```bash +go build . +./zvm +``` + +If you want to disable that ZVM can automatically update itself, you can run + +```bash +go build -tags noAutoUpgrades . +``` + +instead for building the app. + ## Putting ZVM on your Path ZVM requires a few directories to be on your `$PATH`. If you don't know how to @@ -283,9 +304,9 @@ ## Set Version Map Source -ZVM lets you choose your vendor for Zig and ZLS. This is great if your company hosts -its own internal fork of Zig, you prefer a different flavor of the language, -like Mach. +ZVM lets you choose your vendor for Zig and ZLS. This is great if your company +hosts its own internal fork of Zig, you prefer a different flavor of the +language, like Mach. ```sh zvm vmu zig "https://machengine.org/zig/index.json" # Change the source ZVM pulls Zig release information from. @@ -301,7 +322,10 @@ ``` ## Use a Custom Mirror Distribution Server -ZVM now lets you set your own Mirror Distribution Server. If you cannot or choose not to use the official Zig mirror list, you can host your own, or use another grouping of mirrors. + +ZVM now lets you set your own Mirror Distribution Server. If you cannot or +choose not to use the official Zig mirror list, you can host your own, or use +another grouping of mirrors. ```sh zvm mirrorlist <url> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/build.ts new/zvm-0.8.14/build.ts --- old/zvm-0.8.13/build.ts 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/build.ts 2026-03-26 22:04:15.000000000 +0100 @@ -5,9 +5,33 @@ import { Tar } from "https://deno.land/[email protected]/archive/mod.ts"; import { copy } from "https://deno.land/[email protected]/streams/copy.ts"; +import { parseArgs } from "@std/cli/parse-args"; + // Command to count final build results // find ./build -type f \( -name "*.tar" -o -name "*.zip" \) | wc -l +const args = parseArgs(Deno.args, { + string: ["buildUpgradeMessage"], + boolean: ["autoUpgrades"], + negatable: ["autoUpgrades"], + default: { autoUpgrades: true }, +}); + +const BuildUpgradeMessage = args.buildUpgradeMessage || ""; + +if (!args.autoUpgrades) { + console.log( + "%cBuilding without autoUpgrades (noAutoUpgrades)", + "color: yellow;", + ); + if (BuildUpgradeMessage === "" || BuildUpgradeMessage === undefined) { + console.warn( + "%cbuildUpgradeMessage not set, falling back to default message", + "color: red;", + ); + } +} + const GOARCH = [ "amd64", "arm64", @@ -26,102 +50,122 @@ "solaris", ]; +interface Target { + os: string; + arch: string; + label: string; +} + +function getTargets(): Target[] { + const targets: Target[] = []; + for (const os of GOOS) { + for (const arch of GOARCH) { + if ( + os === "solaris" && arch === "arm64" || + os === "plan9" && arch === "arm64" || + os !== "linux" && arch === "loong64" || + os !== "linux" && arch === "ppc64le" + ) { + continue; + } + targets.push({ os, arch, label: `zvm-${os}-${arch}` }); + } + } + return targets; +} + +const projectRoot = Deno.cwd(); + await Deno.mkdir("./build", { recursive: true }); console.time("Built zvm"); Deno.env.set("CGO_ENABLED", "0"); -// Compile step -for (const os of GOOS) { - for (const ar of GOARCH) { - if ( - os == "solaris" && ar == "arm64" || - os == "plan9" && ar == "arm64" || - os != "linux" && ar == "loong64" || - os != "linux" && ar == "ppc64le" - ) { - continue; - } - Deno.env.set("GOOS", os); - Deno.env.set("GOARCH", ar); - const zvm_str = `zvm-${os}-${ar}`; - console.time(`Build zvm: ${zvm_str}`); +const targets = getTargets(); + +// Compile step — all targets in parallel +const compileResults = await Promise.all( + targets.map(async ({ os, arch, label }) => { + console.time(`Build zvm: ${label}`); + + const buildPath = `build/${label}/zvm${os === "windows" ? ".exe" : ""}`; const build_cmd = new Deno.Command("go", { args: [ "build", + ...(args.autoUpgrades ? [] : ["-tags", "noAutoUpgrades"]), "-o", - `build/${zvm_str}/zvm${os === "windows" ? ".exe" : ""}`, - "-ldflags=-w -s", + buildPath, + `-ldflags=-w -s -X 'main.BuildUpgradeMessage=${BuildUpgradeMessage}'`, "-trimpath", ], + env: { + ...Deno.env.toObject(), + GOOS: os, + GOARCH: arch, + }, }); const { code, stderr } = await build_cmd.output(); if (code !== 0) { + console.error(`Failed to build ${label}:`); console.error(new TextDecoder().decode(stderr)); Deno.exit(1); } - // if (os == "windows") { - // await Deno.mkdir(zvm_str, { recursive: true }); - // - // } - - console.timeEnd(`Build zvm: ${zvm_str}`); - } -} + console.timeEnd(`Build zvm: ${label}`); + return `${projectRoot}/build/${label}`; + }), +); + +// Bundle step — all targets in parallel +await Promise.all( + // deno-lint-ignore no-unused-vars + targets.map(async ({ os, arch, label }) => { + const buildDir = `${projectRoot}/build`; -// Bundle step -Deno.chdir("build"); -for (const os of GOOS) { - for (const ar of GOARCH) { - if ( - os == "solaris" && ar == "arm64" || - os == "plan9" && ar == "arm64" || - os != "linux" && ar == "loong64" || - os != "linux" && ar == "ppc64le" - ) { - continue; - } - const zvm_str = `zvm-${os}-${ar}`; - - /** - * Windows - */ if (os === "windows") { - console.time(`Compress zvm (zip): ${zvm_str}`); - const zip = new Deno.Command(`zip`, { + console.time(`Compress zvm (zip): ${label}`); + const zip = new Deno.Command("zip", { args: [ - `${zvm_str}.zip`, - `${zvm_str}/zvm.exe`, - `${zvm_str}/elevate.cmd`, - `${zvm_str}/elevate.vbs`, + `${label}.zip`, + `${label}/zvm.exe`, + `${label}/elevate.cmd`, + `${label}/elevate.vbs`, ], - stdin: "piped", - stdout: "piped", + cwd: buildDir, }); - zip.spawn(); - - console.timeEnd(`Compress zvm (zip): ${zvm_str}`); - continue; + const { code, stderr } = await zip.output(); + if (code !== 0) { + console.error(`Failed to zip ${label}:`); + console.error(new TextDecoder().decode(stderr)); + } + console.timeEnd(`Compress zvm (zip): ${label}`); + return; } + console.time(`Compress zvm (tar): ${label}`); const tar = new Tar(); - console.time(`Compress zvm (tar): ${zvm_str}`); await tar.append("zvm", { - filePath: `${zvm_str}/zvm`, + filePath: `${buildDir}/${label}/zvm`, }); - const writer = await Deno.open(`./${zvm_str}.tar`, { + const writer = await Deno.open(`${buildDir}/${label}.tar`, { write: true, create: true, }); await copy(tar.getReader(), writer); writer.close(); - console.timeEnd(`Compress zvm (tar): ${zvm_str}`); - } -} - -console.timeEnd(`Built zvm`); + console.timeEnd(`Compress zvm (tar): ${label}`); + }), +); + +console.timeEnd("Built zvm"); + +// Cleanup uncompressed directories +console.time("Remove build artifacts"); +await Promise.all( + compileResults.map((dir) => Deno.remove(dir, { recursive: true })), +); +console.timeEnd("Remove build artifacts"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/cli/install.go new/zvm-0.8.14/cli/install.go --- old/zvm-0.8.13/cli/install.go 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/cli/install.go 2026-03-26 22:04:15.000000000 +0100 @@ -640,7 +640,6 @@ } } - return "", ErrUnsupportedVersion } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/cli/meta/build_flags.go new/zvm-0.8.14/cli/meta/build_flags.go --- old/zvm-0.8.13/cli/meta/build_flags.go 1970-01-01 01:00:00.000000000 +0100 +++ new/zvm-0.8.14/cli/meta/build_flags.go 2026-03-26 22:04:15.000000000 +0100 @@ -0,0 +1,5 @@ +package meta + +// BuildFlag represent build flag arguments for program use. +// They're really undercooked macros. +type BuildFlag bool diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/cli/meta/cta.go new/zvm-0.8.14/cli/meta/cta.go --- old/zvm-0.8.13/cli/meta/cta.go 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/cli/meta/cta.go 2026-03-26 22:04:15.000000000 +0100 @@ -74,3 +74,23 @@ fmt.Println(text) } + +func CtaBuilderMsg(message string) { + style := lipgloss.NewStyle(). + Bold(true). + Foreground(lipgloss.Color("#FAFAFA")). + Background(lipgloss.Color("#e12bfb")). + Width(20). + // MarginBottom(1). + Align(lipgloss.Center) + + fmt.Println(style.Render("Builder Message")) + + gray := lipgloss.NewStyle(). + Foreground(lipgloss.Color("#6e6d6d")). + Align(lipgloss.Left) + + fmt.Println(gray.Render("This version of ZVM was built with noAutoUpgrades. To learn more visit https://www.zvm.app/reference/upgrade-zvm/")) + fmt.Println(message) + +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/cli/meta/upgrade.go new/zvm-0.8.14/cli/meta/upgrade.go --- old/zvm-0.8.13/cli/meta/upgrade.go 1970-01-01 01:00:00.000000000 +0100 +++ new/zvm-0.8.14/cli/meta/upgrade.go 2026-03-26 22:04:15.000000000 +0100 @@ -0,0 +1,8 @@ +// This is the (dummy) fallback implementation to use if the `noAutoUpgrades` tag was passed for building. +//go:build !noAutoUpgrades + +package meta + +const ( + NoAutoUpgrades BuildFlag = false +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/cli/meta/upgrade_disabled.go new/zvm-0.8.14/cli/meta/upgrade_disabled.go --- old/zvm-0.8.13/cli/meta/upgrade_disabled.go 1970-01-01 01:00:00.000000000 +0100 +++ new/zvm-0.8.14/cli/meta/upgrade_disabled.go 2026-03-26 22:04:15.000000000 +0100 @@ -0,0 +1,8 @@ +// This is the (dummy) fallback implementation to use if the `noAutoUpgrades` tag was passed for building. +//go:build noAutoUpgrades + +package meta + +const ( + NoAutoUpgrades BuildFlag = true +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/cli/meta/version.go new/zvm-0.8.14/cli/meta/version.go --- old/zvm-0.8.13/cli/meta/version.go 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/cli/meta/version.go 2026-03-26 22:04:15.000000000 +0100 @@ -9,7 +9,7 @@ ) const ( - VERSION = "v0.8.12" + VERSION = "v0.8.14" // VERSION = "v0.0.0" // For testing zvm upgrade diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/cli/upgrade.go new/zvm-0.8.14/cli/upgrade.go --- old/zvm-0.8.13/cli/upgrade.go 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/cli/upgrade.go 2026-03-26 22:04:15.000000000 +0100 @@ -2,6 +2,9 @@ // Use of this source code is governed by the MIT // license that can be found in the LICENSE file. +// You can disable auto-updates by setting `-tags noAutoUpgrades` when building. +//go:build !noAutoUpgrades + package cli import ( @@ -367,15 +370,15 @@ AssetsURL string `json:"assets_url"` UploadURL string `json:"upload_url"` Assets []struct { - UpdatedAt time.Time `json:"updated_at"` - CreatedAt time.Time `json:"created_at"` - Label interface{} `json:"label"` - ContentType string `json:"content_type"` - Name string `json:"name"` - URL string `json:"url"` - State string `json:"state"` - NodeID string `json:"node_id"` - BrowserDownloadURL string `json:"browser_download_url"` + UpdatedAt time.Time `json:"updated_at"` + CreatedAt time.Time `json:"created_at"` + Label any `json:"label"` + ContentType string `json:"content_type"` + Name string `json:"name"` + URL string `json:"url"` + State string `json:"state"` + NodeID string `json:"node_id"` + BrowserDownloadURL string `json:"browser_download_url"` Uploader struct { FollowingURL string `json:"following_url"` NodeID string `json:"node_id"` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/cli/upgrade_disabled.go new/zvm-0.8.14/cli/upgrade_disabled.go --- old/zvm-0.8.13/cli/upgrade_disabled.go 1970-01-01 01:00:00.000000000 +0100 +++ new/zvm-0.8.14/cli/upgrade_disabled.go 2026-03-26 22:04:15.000000000 +0100 @@ -0,0 +1,20 @@ +// Copyright 2025 Tristan Isham. All rights reserved. +// Use of this source code is governed by the MIT +// license that can be found in the LICENSE file. + +// This is the (dummy) fallback implementation to use if the `noAutoUpgrades` tag was passed for building. +//go:build noAutoUpgrades + +package cli + +import ( + "github.com/tristanisham/zvm/cli/meta" +) + +func (z *ZVM) Upgrade() error { + return nil +} + +func CanIUpgrade() (string, bool, error) { + return meta.VERSION, false, nil +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/deno.jsonc new/zvm-0.8.14/deno.jsonc --- old/zvm-0.8.13/deno.jsonc 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/deno.jsonc 2026-03-26 22:04:15.000000000 +0100 @@ -3,5 +3,8 @@ "build": "deno run -A build.ts", "clean": "rm -r build" }, - "imports": { "@std/path": "jsr:@std/path@^0.219.1" } + "imports": { + "@std/cli": "jsr:@std/cli@^1.0.28", + "@std/path": "jsr:@std/path@^0.219.1" + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/deno.lock new/zvm-0.8.14/deno.lock --- old/zvm-0.8.13/deno.lock 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/deno.lock 2026-03-26 22:04:15.000000000 +0100 @@ -2,6 +2,9 @@ "version": "5", "specifiers": { "jsr:@std/assert@~0.219.1": "0.219.1", + "jsr:@std/cli@^1.0.28": "1.0.28", + "jsr:@std/fmt@^1.0.9": "1.0.9", + "jsr:@std/internal@^1.0.12": "1.0.12", "jsr:@std/path@~0.219.1": "0.219.1", "jsr:@zip-js/zip-js@*": "2.7.72" }, @@ -9,6 +12,19 @@ "@std/[email protected]": { "integrity": "e76c2a1799a78f0f4db7de04bdc9b908a7a4b821bb65eda0285885297d4fb8af" }, + "@std/[email protected]": { + "integrity": "74ef9b976db59ca6b23a5283469c9072be6276853807a83ec6c7ce412135c70a", + "dependencies": [ + "jsr:@std/fmt", + "jsr:@std/internal" + ] + }, + "@std/[email protected]": { + "integrity": "2487343e8899fb2be5d0e3d35013e54477ada198854e52dd05ed0422eddcabe0" + }, + "@std/[email protected]": { + "integrity": "972a634fd5bc34b242024402972cd5143eac68d8dffaca5eaa4dba30ce17b027" + }, "@std/[email protected]": { "integrity": "e5c0ffef3a8ef2b48e9e3d88a1489320e8fb2cc7be767b17c91a1424ffb4c8ed", "dependencies": [ @@ -104,6 +120,7 @@ }, "workspace": { "dependencies": [ + "jsr:@std/cli@^1.0.28", "jsr:@std/path@~0.219.1" ] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/go.mod new/zvm-0.8.14/go.mod --- old/zvm-0.8.13/go.mod 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/go.mod 2026-03-26 22:04:15.000000000 +0100 @@ -1,6 +1,6 @@ module github.com/tristanisham/zvm -go 1.25.6 +go 1.26 require ( github.com/charmbracelet/lipgloss v1.1.0 @@ -9,21 +9,21 @@ github.com/nyaosorg/go-windows-junction v0.2.0 github.com/schollz/progressbar/v3 v3.19.0 github.com/tristanisham/clr v0.0.0-20221004001624-00ee60046d85 - golang.org/x/mod v0.32.0 - golang.org/x/sys v0.40.0 + golang.org/x/mod v0.33.0 + golang.org/x/sys v0.41.0 ) require ( github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/charmbracelet/colorprofile v0.4.1 // indirect - github.com/charmbracelet/x/ansi v0.11.4 // indirect - github.com/charmbracelet/x/cellbuf v0.0.14 // indirect + github.com/charmbracelet/colorprofile v0.4.2 // indirect + github.com/charmbracelet/x/ansi v0.11.6 // indirect + github.com/charmbracelet/x/cellbuf v0.0.15 // indirect github.com/charmbracelet/x/term v0.2.2 // indirect - github.com/clipperhouse/displaywidth v0.7.0 // indirect + github.com/clipperhouse/displaywidth v0.10.0 // indirect github.com/clipperhouse/stringish v0.1.1 // indirect - github.com/clipperhouse/uax29/v2 v2.3.1 // indirect + github.com/clipperhouse/uax29/v2 v2.7.0 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - golang.org/x/crypto v0.47.0 // indirect + golang.org/x/crypto v0.48.0 // indirect ) require ( @@ -31,11 +31,11 @@ github.com/go-logfmt/logfmt v0.6.1 // indirect github.com/lucasb-eyer/go-colorful v1.3.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.19 // indirect + github.com/mattn/go-runewidth v0.0.20 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/muesli/termenv v0.16.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/urfave/cli/v3 v3.6.2 - golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect - golang.org/x/term v0.39.0 // indirect + golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect + golang.org/x/term v0.40.0 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/go.sum new/zvm-0.8.14/go.sum --- old/zvm-0.8.13/go.sum 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/go.sum 2026-03-26 22:04:15.000000000 +0100 @@ -6,6 +6,8 @@ github.com/charmbracelet/colorprofile v0.3.3/go.mod h1:nB1FugsAbzq284eJcjfah2nhdSLppN2NqvfotkfRYP4= github.com/charmbracelet/colorprofile v0.4.1 h1:a1lO03qTrSIRaK8c3JRxJDZOvhvIeSco3ej+ngLk1kk= github.com/charmbracelet/colorprofile v0.4.1/go.mod h1:U1d9Dljmdf9DLegaJ0nGZNJvoXAhayhmidOdcBwAvKk= +github.com/charmbracelet/colorprofile v0.4.2 h1:BdSNuMjRbotnxHSfxy+PCSa4xAmz7szw70ktAtWRYrY= +github.com/charmbracelet/colorprofile v0.4.2/go.mod h1:0rTi81QpwDElInthtrQ6Ni7cG0sDtwAd4C4le060fT8= github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= github.com/charmbracelet/log v0.4.2 h1:hYt8Qj6a8yLnvR+h7MwsJv/XvmBJXiueUcI3cIxsyig= @@ -14,8 +16,12 @@ github.com/charmbracelet/x/ansi v0.11.2/go.mod h1:9tY2bzX5SiJCU0iWyskjBeI2BRQfvPqI+J760Mjf+Rg= github.com/charmbracelet/x/ansi v0.11.4 h1:6G65PLu6HjmE858CnTUQY1LXT3ZUWwfvqEROLF8vqHI= github.com/charmbracelet/x/ansi v0.11.4/go.mod h1:/5AZ+UfWExW3int5H5ugnsG/PWjNcSQcwYsHBlPFQN4= +github.com/charmbracelet/x/ansi v0.11.6 h1:GhV21SiDz/45W9AnV2R61xZMRri5NlLnl6CVF7ihZW8= +github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ= github.com/charmbracelet/x/cellbuf v0.0.14 h1:iUEMryGyFTelKW3THW4+FfPgi4fkmKnnaLOXuc+/Kj4= github.com/charmbracelet/x/cellbuf v0.0.14/go.mod h1:P447lJl49ywBbil/KjCk2HexGh4tEY9LH0/1QrZZ9rA= +github.com/charmbracelet/x/cellbuf v0.0.15 h1:ur3pZy0o6z/R7EylET877CBxaiE1Sp1GMxoFPAIztPI= +github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q= github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk= github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI= github.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7mk9/PwM= @@ -24,12 +30,16 @@ github.com/clipperhouse/displaywidth v0.6.1/go.mod h1:R+kHuzaYWFkTm7xoMmK1lFydbci4X2CicfbGstSGg0o= github.com/clipperhouse/displaywidth v0.7.0 h1:QNv1GYsnLX9QBrcWUtMlogpTXuM5FVnBwKWp1O5NwmE= github.com/clipperhouse/displaywidth v0.7.0/go.mod h1:R+kHuzaYWFkTm7xoMmK1lFydbci4X2CicfbGstSGg0o= +github.com/clipperhouse/displaywidth v0.10.0 h1:GhBG8WuerxjFQQYeuZAeVTuyxuX+UraiZGD4HJQ3Y8g= +github.com/clipperhouse/displaywidth v0.10.0/go.mod h1:XqJajYsaiEwkxOj4bowCTMcT1SgvHo9flfF3jQasdbs= github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs= github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA= github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4= github.com/clipperhouse/uax29/v2 v2.3.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= github.com/clipperhouse/uax29/v2 v2.3.1 h1:RjM8gnVbFbgI67SBekIC7ihFpyXwRPYWXn9BZActHbw= github.com/clipperhouse/uax29/v2 v2.3.1/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= +github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= +github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logfmt/logfmt v0.6.1 h1:4hvbpePJKnIzH1B+8OR/JPbTx37NktoI9LE2QZBBkvE= @@ -44,6 +54,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mattn/go-runewidth v0.0.20 h1:WcT52H91ZUAwy8+HUkdM3THM6gXqXuLJi9O3rjcQQaQ= +github.com/mattn/go-runewidth v0.0.20/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= @@ -72,22 +84,32 @@ golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= +golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39 h1:DHNhtq3sNNzrvduZZIiFyXWOL9IWaDPHqTnLJp+rCBY= golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39/go.mod h1:46edojNIoXTNOhySWIWdix628clX9ODXwPsQuG6hsK0= golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= +golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a h1:ovFr6Z0MNmU7nH8VaX5xqw+05ST2uO1exVfZPVqRC5o= +golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA= golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= +golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= +golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/install.sh new/zvm-0.8.14/install.sh --- old/zvm-0.8.13/install.sh 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/install.sh 2026-03-26 22:04:15.000000000 +0100 @@ -1,6 +1,8 @@ #!/usr/bin/env bash -# ZVM install script - v2.0.0 - ZVM: https://github.com/tristanisham/zvm +# ZVM install script - v2.1.0 - ZVM: https://github.com/tristanisham/zvm +set -eu + ARCH=$(uname -m) OS=$(uname -s) @@ -32,14 +34,15 @@ elif [ "$OS" = "Linux" ]; then # Do something under GNU/Linux platform - if command -v wget2 >/dev/null 2>&1; then - echo "wget2 is installed. Using wget2..." - wget2 -q --force-progress --max-redirect 5 -O zvm.tar "https://github.com/tristanisham/zvm/releases/latest/download/$1" - elif command -v wget >/dev/null 2>&1; then + if command -v wget >/dev/null 2>&1; then echo "wget is installed. Using wget..." wget -q --show-progress --max-redirect 5 -O zvm.tar "https://github.com/tristanisham/zvm/releases/latest/download/$1" + # TODO change so curl is checked and if fails, then do wget2. I don't like wget2's output. + elif command -v wget2 >/dev/null 2>&1; then + echo "wget2 is installed. Using wget2..." + wget2 -q --force-progress --max-redirect 5 -O zvm.tar "https://github.com/tristanisham/zvm/releases/latest/download/$1" else - echo "wget is not installed. Using curl..." + echo "wget or wget2 are not installed. Using curl..." curl -L --max-redirs 5 "https://github.com/tristanisham/zvm/releases/latest/download/$1" -o zvm.tar fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zvm-0.8.13/main.go new/zvm-0.8.14/main.go --- old/zvm-0.8.13/main.go 2026-01-26 22:07:54.000000000 +0100 +++ new/zvm-0.8.14/main.go 2026-03-26 22:04:15.000000000 +0100 @@ -20,8 +20,9 @@ ) var ( - zvm cli.ZVM - printUpgradeNotice bool = true + zvm cli.ZVM + printUpgradeNotice bool = true + BuildUpgradeMessage = "You should probably use your system package manager to update ZVM." ) var zvmApp = &opts.Command{ @@ -227,8 +228,14 @@ Name: "upgrade", Usage: "self-upgrade ZVM", Action: func(ctx context.Context, cmd *opts.Command) error { + if meta.NoAutoUpgrades { + // This is where you as a distributor or builder can specify how to upgrade + // zvm on your system. + meta.CtaBuilderMsg(BuildUpgradeMessage) + } printUpgradeNotice = false return zvm.Upgrade() + }, }, { @@ -323,7 +330,12 @@ } _, checkUpgradeDisabled := os.LookupEnv("ZVM_SET_CU") - log.Debug("Automatic Upgrade Checker", "disabled", checkUpgradeDisabled) + + if meta.NoAutoUpgrades { + checkUpgradeDisabled = true + } + + log.Debug("Automatic Upgrade Checker", "disabled", checkUpgradeDisabled, "noAutoUpgrades", meta.NoAutoUpgrades) // Upgrade upSig := make(chan string, 1) @@ -358,10 +370,14 @@ } if tag := <-upSig; tag != "" { - if printUpgradeNotice { - meta.CtaUpgradeAvailable(tag) - } else { - log.Infof("You are now using ZVM %s\n", tag) + + if !meta.NoAutoUpgrades { + if printUpgradeNotice { + meta.CtaUpgradeAvailable(tag) + } else { + log.Infof("You are now using ZVM %s\n", tag) + } } + } }
