From 9fa3fa3fc7a74799736967a78f1fecb0e76d0d67 Mon Sep 17 00:00:00 2001 From: Daud Ahmad Date: Fri, 6 Nov 2026 01:53:49 +0500 Subject: [PATCH] release: prepare v2.2.0 CSV output and the --output-file extension fix landed after v2.1.2, so this is a minor release rather than a patch. Add .github/release-notes/v2.2.0.md, which the release workflow requires and publishes as the GitHub release body. Bump the version in root.go and the test that asserts it, and move the README prose, download table and install instructions onto the 2.2.0 archive names the build will produce. cmd/release_test.go keeps its 2.1.2 fixture: it supplies its own compiler stub and tag, so it exercises the version guard rather than the current version. --- .github/release-notes/v2.2.0.md | 9 +++++++++ README.md | 26 +++++++++++++------------- cmd/commands_test.go | 2 +- cmd/root.go | 2 +- 4 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 .github/release-notes/v2.2.0.md diff --git a/.github/release-notes/v2.2.0.md b/.github/release-notes/v2.2.0.md new file mode 100644 index 0000000..4c36bdd --- /dev/null +++ b/.github/release-notes/v2.2.0.md @@ -0,0 +1,9 @@ +- Add `--output csv` to get results as CSV from every command. +- Write one row per record for bulk lookups, with nested fields as dotted columns such as `location.city`. +- Save CSV to a file with `--output-file` on `bulk-ip-geo` and `bulk-ip-security`. +- Add the `.csv` or `.json` extension to `--output-file` only when the name does not already end in it. +- Fix `--output-file=output.json`, which saved `output.json.json`. +- Point the pkg.go.dev link at the `/v2` module path, which serves the current release. +- Correct the UN/LOCODE spelling and an `--include` example in the README. + +Existing commands and output formats remain available. diff --git a/README.md b/README.md index ebf7cc9..65cf16c 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ For local HTTPS regression checks, install Node.js and Postman CLI 1.73.0, then ### Download Prebuilt Binaries #### Overview -These are prebuilt binaries for the IPGeolocation.io CLI tool, version **2.1.2**. Users can download these files directly from [GitHub Releases](https://github.com/IPGeolocation/cli/releases) or from the table below without needing to build from source. +These are prebuilt binaries for the IPGeolocation.io CLI tool, version **2.2.0**. Users can download these files directly from [GitHub Releases](https://github.com/IPGeolocation/cli/releases) or from the table below without needing to build from source. The CLI provides geolocation information, time zone, user-agent parsing, bulk IP lookups, and more. @@ -163,13 +163,13 @@ The CLI provides geolocation information, time zone, user-agent parsing, bulk IP | Platform | Architecture | File Name / Download Link | |----------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------| -| Linux | amd64 | [**ipgeolocation-2.1.2-linux-amd64.tar.gz**](https://github.com/IPGeolocation/cli/releases/download/v2.1.2/ipgeolocation-2.1.2-linux-amd64.tar.gz) | -| Linux | arm64 | [**ipgeolocation-2.1.2-linux-arm64.tar.gz**](https://github.com/IPGeolocation/cli/releases/download/v2.1.2/ipgeolocation-2.1.2-linux-arm64.tar.gz) | -| macOS | amd64 | [**ipgeolocation-2.1.2-darwin-amd64.tar.gz**](https://github.com/IPGeolocation/cli/releases/download/v2.1.2/ipgeolocation-2.1.2-darwin-amd64.tar.gz) | -| macOS | arm64 | [**ipgeolocation-2.1.2-darwin-arm64.tar.gz**](https://github.com/IPGeolocation/cli/releases/download/v2.1.2/ipgeolocation-2.1.2-darwin-arm64.tar.gz) | -| Windows | amd64 | [**ipgeolocation-2.1.2-windows-amd64.zip**](https://github.com/IPGeolocation/cli/releases/download/v2.1.2/ipgeolocation-2.1.2-windows-amd64.zip) | +| Linux | amd64 | [**ipgeolocation-2.2.0-linux-amd64.tar.gz**](https://github.com/IPGeolocation/cli/releases/download/v2.2.0/ipgeolocation-2.2.0-linux-amd64.tar.gz) | +| Linux | arm64 | [**ipgeolocation-2.2.0-linux-arm64.tar.gz**](https://github.com/IPGeolocation/cli/releases/download/v2.2.0/ipgeolocation-2.2.0-linux-arm64.tar.gz) | +| macOS | amd64 | [**ipgeolocation-2.2.0-darwin-amd64.tar.gz**](https://github.com/IPGeolocation/cli/releases/download/v2.2.0/ipgeolocation-2.2.0-darwin-amd64.tar.gz) | +| macOS | arm64 | [**ipgeolocation-2.2.0-darwin-arm64.tar.gz**](https://github.com/IPGeolocation/cli/releases/download/v2.2.0/ipgeolocation-2.2.0-darwin-arm64.tar.gz) | +| Windows | amd64 | [**ipgeolocation-2.2.0-windows-amd64.zip**](https://github.com/IPGeolocation/cli/releases/download/v2.2.0/ipgeolocation-2.2.0-windows-amd64.zip) | -Archives include [SHA256SUMS](https://github.com/IPGeolocation/cli/releases/download/v2.1.2/SHA256SUMS) for download verification. +Archives include [SHA256SUMS](https://github.com/IPGeolocation/cli/releases/download/v2.2.0/SHA256SUMS) for download verification. #### Installation Instructions @@ -177,11 +177,11 @@ Archives include [SHA256SUMS](https://github.com/IPGeolocation/cli/releases/down 1. Download the `.tar.gz` file for your architecture. 2. Extract it to a folder in your PATH, e.g., `/usr/local/bin`: ```bash - tar -xzf ipgeolocation-2.1.2-linux-amd64.tar.gz -C /usr/local/bin + tar -xzf ipgeolocation-2.2.0-linux-amd64.tar.gz -C /usr/local/bin ``` 3. Rename the binary for simplicity: ```bash - mv /usr/local/bin/ipgeolocation-2.1.2-linux-amd64 /usr/local/bin/ipgeolocation + mv /usr/local/bin/ipgeolocation-2.2.0-linux-amd64 /usr/local/bin/ipgeolocation ``` 4. Make the binary executable: ```bash @@ -196,11 +196,11 @@ Archives include [SHA256SUMS](https://github.com/IPGeolocation/cli/releases/down 1. Download the `.tar.gz` file for your architecture (amd64 or arm64). 2. Extract to a folder in your PATH, e.g., `/usr/local/bin`: ```bash - tar -xzf ipgeolocation-2.1.2-darwin-amd64.tar.gz -C /usr/local/bin + tar -xzf ipgeolocation-2.2.0-darwin-amd64.tar.gz -C /usr/local/bin ``` 3. Rename the binary: ```bash - mv /usr/local/bin/ipgeolocation-2.1.2-darwin-amd64 /usr/local/bin/ipgeolocation + mv /usr/local/bin/ipgeolocation-2.2.0-darwin-amd64 /usr/local/bin/ipgeolocation ``` 4. Make executable: ```bash @@ -213,7 +213,7 @@ Archives include [SHA256SUMS](https://github.com/IPGeolocation/cli/releases/down **Windows:** 1. Download the `.zip` file. -2. Extract the `ipgeolocation-2.1.2-windows-amd64.exe` to a folder included in your system `PATH`. +2. Extract the `ipgeolocation-2.2.0-windows-amd64.exe` to a folder included in your system `PATH`. 3. Rename the binary to `ipgeolocation.exe` for convenience. 4. Open Command Prompt and verify: ```cmd @@ -223,7 +223,7 @@ Archives include [SHA256SUMS](https://github.com/IPGeolocation/cli/releases/down > [!NOTE] > - Ensure execution permissions on Linux/macOS. > - Recommended folder for binaries: `/usr/local/bin` or any folder in your PATH. -> - Prebuilt binaries include version **2.1.2** in their filename. Rename them after extraction for easier use. +> - Prebuilt binaries include version **2.2.0** in their filename. Rename them after extraction for easier use. > - For updates, check GitHub Releases. ### Troubleshooting diff --git a/cmd/commands_test.go b/cmd/commands_test.go index 81d4bd5..344d928 100644 --- a/cmd/commands_test.go +++ b/cmd/commands_test.go @@ -282,7 +282,7 @@ func TestCLIConfigAndBulkFiles(t *testing.T) { if output := runCLI(t, home, "config"); strings.Contains(output, "short") || !strings.Contains(output, "********") { t.Fatalf("short key exposed: %s", output) } - if output := runCLI(t, home, "--version"); output != "ipgeolocation version 2.1.2" { + if output := runCLI(t, home, "--version"); output != "ipgeolocation version 2.2.0" { t.Fatalf("incorrect version: %s", output) } if output := runCLI(t, home, "--help"); !strings.Contains(output, "time-conversion") { diff --git a/cmd/root.go b/cmd/root.go index 7ca4294..024a0ab 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -18,7 +18,7 @@ import ( var rootCmd = &cobra.Command{ Use: "ipgeolocation", Short: "CLI for accessing IPGeolocation.io API endpoints", - Version: "2.1.2", + Version: "2.2.0", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { return utils.ValidateRequestLimits() },