Skip to content

1 #1

@SamuelZhaoY

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions