diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 522dc88d..463893ad 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -12,7 +12,7 @@ builds: # Can be a path (e.g. `bin/app`) to wrap the binary in a directory. # # Default: Project directory name - binary: pingcli + binary: "pingcli" # Custom environment variables to be set during the builds. # Invalid environment variables will be ignored. @@ -21,7 +21,7 @@ builds: # Default: os.Environ() ++ env config section. # Templates: allowed. env: - - CGO_ENABLED=0 + - "CGO_ENABLED=0" # GOOS list to build for. # For more info refer to: https://golang.org/doc/install/source#environment @@ -29,9 +29,9 @@ builds: # # Default: [ 'darwin', 'linux', 'windows' ] goos: - - darwin - - linux - - windows + - "darwin" + - "linux" + - "windows" # GOARCH to build for. # For more info refer to: https://golang.org/doc/install/source#environment @@ -39,15 +39,16 @@ builds: # # Default: [ '386', 'amd64', 'arm64' ] goarch: - - amd64 - - arm64 + - "386" + - "amd64" + - "arm64" release: # If set to auto, will mark the release as not ready for production # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 # If set to true, will mark the release as not ready for production. # Default is false. - prerelease: auto + prerelease: "auto" # If set to false, will NOT mark the release as "latest". # This prevents it from being shown at the top of the release list, @@ -68,7 +69,7 @@ release: # - `replace`: replace existing notes # # Default is `keep-existing`. - mode: append + mode: "append" checksum: # Algorithm to be used. @@ -89,7 +90,7 @@ checksum: # - blake2b # # Default: 'sha256'. - algorithm: sha256 + algorithm: "sha256" # If true, will create one checksum file for each artifact. split: true @@ -100,8 +101,8 @@ checksum: brews: - # Git author used to commit to the repository. commit_author: - name: goreleaserbot - email: bot@goreleaser.com + name: "goreleaserbot" + email: "bot@goreleaser.com" # The project name and current git tag are used in the format string. # @@ -109,7 +110,7 @@ brews: commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" # Directory inside the repository to put the formula. - directory: Formula + directory: "Formula" # Caveats for the user of your binary. # caveats: "How to use this binary" @@ -137,7 +138,7 @@ brews: # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 # # Templates: allowed. - skip_upload: auto + skip_upload: "auto" # So you can `brew test` your formula. # @@ -151,12 +152,12 @@ brews: # Repository owner. # # Templates: allowed. - owner: pingidentity + owner: "pingidentity" # Repository name. # # Templates: allowed. - name: homebrew-tap + name: "homebrew-tap" token: "{{ .Env.GORELEASER_HOMEBREW_TAP_GITHUB_PAT}}" @@ -177,7 +178,7 @@ dockers: # GOARCH of the built binaries/packages that should be used. # Default: 'amd64'. - goarch: amd64 + goarch: "amd64" # Set the "backend" for the Docker pipe. # @@ -186,7 +187,7 @@ dockers: # Podman is a GoReleaser Pro feature and is only available on Linux. # # Default: 'docker'. - use: buildx + use: "buildx" # You can have multiple Docker images. # Templates of the Docker image names. @@ -204,7 +205,7 @@ dockers: # GOARCH of the built binaries/packages that should be used. # Default: 'amd64'. - goarch: arm64 + goarch: "arm64" # Set the "backend" for the Docker pipe. # @@ -213,7 +214,7 @@ dockers: # Podman is a GoReleaser Pro feature and is only available on Linux. # # Default: 'docker'. - use: buildx + use: "buildx" docker_manifests: # Name for the manifest. diff --git a/README.md b/README.md index f6da997b..5fc6a9de 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,13 @@ The Ping CLI is a unified command line interface for configuring and managing Pi Use the [Ping CLI Docker image](https://hub.docker.com/r/pingidentity/pingcli) -```text Pull Image: +```shell docker pull pingidentity/pingcli:latest +``` Example Commands: +```shell docker run docker run --version @@ -22,11 +24,11 @@ docker run --version Use PingIdentity's Homebrew tap to install Ping CLI -```text +```shell brew install pingidentity/tap/pingcli - +``` or - +``` shell brew tap pingidentity/tap brew install pingcli ``` @@ -39,7 +41,7 @@ OR Use the following single-line command to install Ping CLI into '/usr/local/bin' directly. -```text +```shell RELEASE_VERSION=$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/pingidentity/pingcli/releases/latest)); \ OS_NAME=$(uname -s); \ HARDWARE_PLATFORM=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/); \ @@ -55,17 +57,16 @@ See [the latest GitHub release](https://github.com/pingidentity/pingcli/releases OR -Use the following single-line powershell command to install Ping CLI into '%LOCALAPPDATA%\Programs' directly. -```text +Use the following single-line PowerShell 7.4 command to install Ping CLI into '%LOCALAPPDATA%\Programs' directly. +```powershell $latestReleaseUrl = Invoke-WebRequest -Uri "https://github.com/pingidentity/pingcli/releases/latest" -MaximumRedirection 0 -ErrorAction Ignore -UseBasicParsing -SkipHttpErrorCheck; ` $RELEASE_VERSION = [System.IO.Path]::GetFileName($latestReleaseUrl.Headers.Location); ` $RELEASE_VERSION_NO_PREFIX = $RELEASE_VERSION -replace "^v", ""; ` -$uname = (uname -m); ` -$HARDWARE_PLATFORM = $uname -replace "aarch64", "arm64" -replace "x86_64", "amd64"; ` +$HARDWARE_PLATFORM = $env:PROCESSOR_ARCHITECTURE -replace "ARM64", "arm64" -replace "x86", "386" -replace "AMD64", "amd64" -replace "EM64T", "amd64"; ` $URL = "https://github.com/pingidentity/pingcli/releases/download/${RELEASE_VERSION}/pingcli_${RELEASE_VERSION_NO_PREFIX}_windows_${HARDWARE_PLATFORM}.tar.gz" -Invoke-WebRequest -Uri $URL -OutFile pingcli.tar.gz; ` -tar -zxf pingcli.tar.gz -C "${env:LOCALAPPDATA}\Programs" pingcli.exe; ` -Remove-Item pingcli.tar.gz +Invoke-WebRequest -Uri $URL -OutFile "pingcli.tar.gz"; ` +tar -zxf "pingcli.tar.gz" -C "${env:LOCALAPPDATA}\Programs" pingcli.exe; ` +Remove-Item "pingcli.tar.gz" ``` ## Configure Ping CLI