Skip to content

1 #1

Description

@SamuelZhaoY
$dest = "C:\tools\release-cli.exe"

New-Item -ItemType Directory -Force -Path "C:\tools" | Out-Null
Invoke-WebRequest -Uri "https://gitlab.com/gitlab-org/release-cli/-/releases/v0.22.0/downloads/bin/release-cli-windows-amd64.exe" -OutFile $dest -UseBasicParsing

# 写到当前用户 PATH(不需要管理员权限)
$userPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
if ($userPath -notlike "*C:\tools*") {
    [System.Environment]::SetEnvironmentVariable("Path", "$userPath;C:\tools", "User")
    Write-Host "Added C:\tools to user PATH"
}

& "C:\tools\release-cli.exe" --version

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions