Skip to content

Commit

Permalink
gen_installer
Browse files Browse the repository at this point in the history
  • Loading branch information
epompeii committed Nov 29, 2024
1 parent c703f08 commit 2ce1872
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions services/cli/templates/output/install-cli.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ Print help
#>

$app_name = 'bencher'
$app_version = if ($env:BENCHER_VERSION) { $env:BENCHER_VERSION } else { '0.4.28' }

param (
[Parameter(HelpMessage = "The URL of the directory where artifacts can be fetched from")]
[string]$ArtifactDownloadUrl = 'https://bencher.dev/download/0.4.28',
[string]$ArtifactDownloadUrl = "https://bencher.dev/download/$app_version",
[Parameter(HelpMessage = "Don't add the install directory to PATH")]
[switch]$NoModifyPath,
[Parameter(HelpMessage = "Print Help")]
[switch]$Help
)

$app_name = 'bencher'
$app_version = '0.4.28'

function Install-Binary($install_args) {
if ($Help) {
Expand Down
6 changes: 3 additions & 3 deletions services/cli/templates/output/install-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ fi
set -u

APP_NAME=bencher
APP_VERSION="0.4.28"
ARTIFACT_DOWNLOAD_URL="${INSTALLER_DOWNLOAD_URL:-https://bencher.dev/download/0.4.28}"
APP_VERSION="${BENCHER_VERSION:-0.4.28}"
ARTIFACT_DOWNLOAD_URL="${INSTALLER_DOWNLOAD_URL:-https://bencher.dev/download/$APP_VERSION}"
PRINT_VERBOSE=${INSTALLER_PRINT_VERBOSE:-0}
PRINT_QUIET=${INSTALLER_PRINT_QUIET:-0}
NO_MODIFY_PATH=${INSTALLER_NO_MODIFY_PATH:-0}
Expand All @@ -33,7 +33,7 @@ usage() {
cat <<EOF
install-cli.sh
Bencher CLI v0.4.28 Installer
Bencher CLI v$APP_VERSION Installer
This script detects what platform you're on and fetches an appropriate archive from https://bencher.dev.
It then unpacks the binaries and installs them to \$CARGO_HOME/bin (\$HOME/.cargo/bin).
Expand Down

0 comments on commit 2ce1872

Please sign in to comment.