From 912b0960f80328ddbf949c572df0d03671237ae1 Mon Sep 17 00:00:00 2001 From: Joshua Tracy Date: Thu, 14 May 2026 19:36:45 -0400 Subject: [PATCH 1/3] Create install scripts --- .goreleaser.yml | 32 ++++++++++++------------ install.ps1 | 51 ++++++++++++++++++++++++++++++++++++++ install.sh | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ project.yaml | 16 ++++++++++++ 4 files changed, 148 insertions(+), 16 deletions(-) create mode 100644 install.ps1 create mode 100644 install.sh create mode 100644 project.yaml diff --git a/.goreleaser.yml b/.goreleaser.yml index a96f7d7..70b0da8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -92,29 +92,29 @@ release: footer: | ## Installation - ### Binary Installation - - Download the appropriate binary for your platform from the assets below. - - ### Quick Install Script (Linux/macOS) + ### One-line install (Linux & macOS) ```bash - # Linux - curl -L https://github.com/WizardOpsTech/conjure/releases/download/{{ .Tag }}/conjure_{{ .Tag }}_Linux_x86_64.tar.gz | tar xz - sudo mv conjure /usr/local/bin/ + curl -sfL https://raw.githubusercontent.com/WizardOpsTech/conjure/main/install.sh | sh + ``` - # macOS (Intel) - curl -L https://github.com/WizardOpsTech/conjure/releases/download/{{ .Tag }}/conjure_{{ .Tag }}_Darwin_x86_64.tar.gz | tar xz - sudo mv conjure /usr/local/bin/ + ### One-line install (Windows PowerShell) - # macOS (Apple Silicon) - curl -L https://github.com/WizardOpsTech/conjure/releases/download/{{ .Tag }}/conjure_{{ .Tag }}_Darwin_arm64.tar.gz | tar xz - sudo mv conjure /usr/local/bin/ + ```powershell + irm https://raw.githubusercontent.com/WizardOpsTech/conjure/main/install.ps1 | iex ``` - ### Windows + ### Manual binary download + + Download the archive for your platform from the assets below, extract it, and move the binary to a directory on your PATH. - Download the ZIP file, extract it, and add the executable to your PATH. + | Platform | Archive | + |---|---| + | Linux x86_64 | `conjure_{{ .Tag }}_Linux_x86_64.tar.gz` | + | Linux arm64 | `conjure_{{ .Tag }}_Linux_arm64.tar.gz` | + | macOS Intel | `conjure_{{ .Tag }}_Darwin_x86_64.tar.gz` | + | macOS Apple Silicon | `conjure_{{ .Tag }}_Darwin_arm64.tar.gz` | + | Windows x86_64 | `conjure_{{ .Tag }}_Windows_x86_64.zip` | --- diff --git a/install.ps1 b/install.ps1 new file mode 100644 index 0000000..32052d7 --- /dev/null +++ b/install.ps1 @@ -0,0 +1,51 @@ +# Conjure installer — Windows (PowerShell 5.1+) +# Usage: irm https://raw.githubusercontent.com/WizardOpsTech/conjure/main/install.ps1 | iex +$ErrorActionPreference = 'Stop' + +# Windows arm64 is not supported by the published binaries +if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { + Write-Error "Windows arm64 is not currently supported. Use WSL2 and the Linux installer instead:`n curl -sfL https://raw.githubusercontent.com/WizardOpsTech/conjure/main/install.sh | sh" + exit 1 +} + +# Fetch latest release info from the GitHub API +Write-Host "Fetching latest Conjure release..." +$release = Invoke-RestMethod "https://api.github.com/repos/WizardOpsTech/conjure/releases/latest" +$tag = $release.tag_name # e.g. "v1.0.0" + +$archive = "conjure_${tag}_Windows_x86_64.zip" +$url = "https://github.com/WizardOpsTech/conjure/releases/download/$tag/$archive" + +Write-Host "Installing conjure $tag for Windows x86_64..." + +# Download to a unique temp directory +$tmp = Join-Path $env:TEMP "conjure-install-$([System.IO.Path]::GetRandomFileName())" +$zipPath = Join-Path $tmp "conjure.zip" +New-Item -ItemType Directory -Force -Path $tmp | Out-Null + +try { + Invoke-WebRequest -Uri $url -OutFile $zipPath -UseBasicParsing + Expand-Archive -Path $zipPath -DestinationPath $tmp -Force + + # Install to %USERPROFILE%\bin — no admin required + $installDir = Join-Path $env:USERPROFILE "bin" + New-Item -ItemType Directory -Force -Path $installDir | Out-Null + Move-Item -Force (Join-Path $tmp "conjure.exe") (Join-Path $installDir "conjure.exe") + + # Add the install directory to the user PATH if it is not already there + $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") + if ($null -eq $userPath) { $userPath = "" } + if ($userPath -notlike "*$installDir*") { + [Environment]::SetEnvironmentVariable("PATH", "$userPath;$installDir", "User") + Write-Host "" + Write-Host "conjure $tag installed to $installDir" + Write-Host "Added $installDir to your PATH." + Write-Host "Restart your terminal, then run: conjure --version" + } else { + Write-Host "" + Write-Host "conjure $tag installed to $installDir" + Write-Host "Run: conjure --version" + } +} finally { + Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue +} diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..f481a32 --- /dev/null +++ b/install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env sh +# Conjure installer — Linux & macOS +# Usage: curl -sfL https://raw.githubusercontent.com/WizardOpsTech/conjure/main/install.sh | sh +set -e + +# Detect OS +OS=$(uname -s) +case "$OS" in + Linux) OS_SLUG="Linux" ;; + Darwin) OS_SLUG="Darwin" ;; + *) + echo "Unsupported OS: $OS" + echo "Windows users: run this in PowerShell instead:" + echo " irm https://raw.githubusercontent.com/WizardOpsTech/conjure/main/install.ps1 | iex" + exit 1 + ;; +esac + +# Detect architecture +ARCH=$(uname -m) +case "$ARCH" in + x86_64) ARCH_SLUG="x86_64" ;; + aarch64|arm64) ARCH_SLUG="arm64" ;; + *) + echo "Unsupported architecture: $ARCH" + exit 1 + ;; +esac + +# Fetch latest release tag from the GitHub API +echo "Fetching latest Conjure release..." +TAG=$(curl -sfL "https://api.github.com/repos/WizardOpsTech/conjure/releases/latest" \ + | grep '"tag_name"' \ + | head -1 \ + | cut -d'"' -f4) + +if [ -z "$TAG" ]; then + echo "Failed to fetch release info. Check your internet connection and try again." + exit 1 +fi + +ARCHIVE="conjure_${TAG}_${OS_SLUG}_${ARCH_SLUG}.tar.gz" +URL="https://github.com/WizardOpsTech/conjure/releases/download/${TAG}/${ARCHIVE}" + +echo "Installing conjure ${TAG} for ${OS_SLUG}/${ARCH_SLUG}..." + +# Download and extract the binary to a temp directory +TMP=$(mktemp -d) +trap 'rm -rf "$TMP"' EXIT + +curl -sfL "$URL" | tar xzf - -C "$TMP" conjure +chmod +x "$TMP/conjure" + +# Install to /usr/local/bin — use sudo if the directory is not writable +INSTALL_DIR="/usr/local/bin" +if [ -w "$INSTALL_DIR" ]; then + mv "$TMP/conjure" "$INSTALL_DIR/conjure" +else + echo "Installing to $INSTALL_DIR requires elevated permissions..." + sudo mv "$TMP/conjure" "$INSTALL_DIR/conjure" +fi + +echo "" +echo "conjure ${TAG} installed to ${INSTALL_DIR}/conjure" +echo "Run: conjure --version" diff --git a/project.yaml b/project.yaml new file mode 100644 index 0000000..8ddda13 --- /dev/null +++ b/project.yaml @@ -0,0 +1,16 @@ +name: conjure +type: cli +description: Template-driven configuration generation CLI for DevOps, platform engineers, and developers. +visibility: public +indexing: none +stack: + - go + - cobra + - viper + - bubbletea +standards: + - go + - cli + - testing + - logging + - error-handling From 0d2c4c81426f3f2cb36f27134ccee4b4a95899d6 Mon Sep 17 00:00:00 2001 From: Joshua Tracy Date: Thu, 14 May 2026 20:03:29 -0400 Subject: [PATCH 2/3] ai metadata instructions added --- project.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/project.yaml b/project.yaml index 8ddda13..53df910 100644 --- a/project.yaml +++ b/project.yaml @@ -14,3 +14,4 @@ standards: - testing - logging - error-handling + - conjure-release-contract From 696bc0c4ca50c7bddda3706e707c635d5e86bf95 Mon Sep 17 00:00:00 2001 From: Joshua Tracy Date: Thu, 14 May 2026 20:03:46 -0400 Subject: [PATCH 3/3] install scripts createD --- .goreleaser.yml | 14 +++++++------- install.ps1 | 9 +++++---- install.sh | 7 ++++--- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 70b0da8..d48747a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -86,7 +86,7 @@ release: prerelease: auto mode: replace header: | - ## Conjure {{ .Tag }} ({{ .Date }}) + ## Conjure {{ .Version }} ({{ .Date }}) Welcome to this new release of Conjure! footer: | @@ -110,12 +110,12 @@ release: | Platform | Archive | |---|---| - | Linux x86_64 | `conjure_{{ .Tag }}_Linux_x86_64.tar.gz` | - | Linux arm64 | `conjure_{{ .Tag }}_Linux_arm64.tar.gz` | - | macOS Intel | `conjure_{{ .Tag }}_Darwin_x86_64.tar.gz` | - | macOS Apple Silicon | `conjure_{{ .Tag }}_Darwin_arm64.tar.gz` | - | Windows x86_64 | `conjure_{{ .Tag }}_Windows_x86_64.zip` | + | Linux x86_64 | `conjure_{{ .Version }}_Linux_x86_64.tar.gz` | + | Linux arm64 | `conjure_{{ .Version }}_Linux_arm64.tar.gz` | + | macOS Intel | `conjure_{{ .Version }}_Darwin_x86_64.tar.gz` | + | macOS Apple Silicon | `conjure_{{ .Version }}_Darwin_arm64.tar.gz` | + | Windows x86_64 | `conjure_{{ .Version }}_Windows_x86_64.zip` | --- - **Full Changelog**: https://github.com/WizardOpsTech/conjure/compare/{{ .PreviousTag }}...{{ .Tag }} + **Full Changelog**: https://github.com/WizardOpsTech/conjure/compare/{{ .PreviousTag }}...{{ .Version }} diff --git a/install.ps1 b/install.ps1 index 32052d7..60f7e06 100644 --- a/install.ps1 +++ b/install.ps1 @@ -12,11 +12,12 @@ if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { Write-Host "Fetching latest Conjure release..." $release = Invoke-RestMethod "https://api.github.com/repos/WizardOpsTech/conjure/releases/latest" $tag = $release.tag_name # e.g. "v1.0.0" +$version = $tag.TrimStart('v') # e.g. "1.0.0" -$archive = "conjure_${tag}_Windows_x86_64.zip" +$archive = "conjure_${version}_Windows_x86_64.zip" $url = "https://github.com/WizardOpsTech/conjure/releases/download/$tag/$archive" -Write-Host "Installing conjure $tag for Windows x86_64..." +Write-Host "Installing conjure $version for Windows x86_64..." # Download to a unique temp directory $tmp = Join-Path $env:TEMP "conjure-install-$([System.IO.Path]::GetRandomFileName())" @@ -38,12 +39,12 @@ try { if ($userPath -notlike "*$installDir*") { [Environment]::SetEnvironmentVariable("PATH", "$userPath;$installDir", "User") Write-Host "" - Write-Host "conjure $tag installed to $installDir" + Write-Host "conjure $version installed to $installDir" Write-Host "Added $installDir to your PATH." Write-Host "Restart your terminal, then run: conjure --version" } else { Write-Host "" - Write-Host "conjure $tag installed to $installDir" + Write-Host "conjure $version installed to $installDir" Write-Host "Run: conjure --version" } } finally { diff --git a/install.sh b/install.sh index f481a32..744e79e 100644 --- a/install.sh +++ b/install.sh @@ -39,10 +39,11 @@ if [ -z "$TAG" ]; then exit 1 fi -ARCHIVE="conjure_${TAG}_${OS_SLUG}_${ARCH_SLUG}.tar.gz" +VERSION="${TAG#v}" +ARCHIVE="conjure_${VERSION}_${OS_SLUG}_${ARCH_SLUG}.tar.gz" URL="https://github.com/WizardOpsTech/conjure/releases/download/${TAG}/${ARCHIVE}" -echo "Installing conjure ${TAG} for ${OS_SLUG}/${ARCH_SLUG}..." +echo "Installing conjure ${VERSION} for ${OS_SLUG}/${ARCH_SLUG}..." # Download and extract the binary to a temp directory TMP=$(mktemp -d) @@ -61,5 +62,5 @@ else fi echo "" -echo "conjure ${TAG} installed to ${INSTALL_DIR}/conjure" +echo "conjure ${VERSION} installed to ${INSTALL_DIR}/conjure" echo "Run: conjure --version"