From 973764d1fdceda82787094fe24eabc49ccf61fca Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 20 Oct 2026 18:40:28 +0100 Subject: [PATCH] fix: target .NET 8 and roll forward, and point the Docker images at 0.9.1 .NET 7 has been out of support since May 2024, so on a machine with only .NET 8 or 10 `dotnet tool install Explore.Cli` installs a tool that will not start. Target net8.0 and set RollForward=Major so the tool runs on any newer runtime too. CI, the tests and the README follow. The Docker images still downloaded 0.8.2 (Debian) and 0.6.0 (Alpine), which call the retired spaces-api and get 404s from Explore. Both now take ARG VERSION, defaulting to 0.9.1. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/build-test-cross.yml | 2 +- .github/workflows/build-test-package.yml | 2 +- .github/workflows/build-test-publish.yml | 2 +- Dockerfile.alpine | 3 ++- Dockerfile.debian | 2 +- README.md | 4 ++-- src/Explore.Cli/Explore.Cli.csproj | 3 ++- test/Explore.Cli.Tests/Explore.Cli.Tests.csproj | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-test-cross.yml b/.github/workflows/build-test-cross.yml index 4fd402e..3898b8c 100644 --- a/.github/workflows/build-test-cross.yml +++ b/.github/workflows/build-test-cross.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: - dotnet-version: 7.x + dotnet-version: 8.x - name: build dotnet executables run: make build - name: size of executables diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index 937bace..e6ce5f0 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -49,7 +49,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - name: restore dependencies run: dotnet restore diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index d642cce..120545a 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -39,7 +39,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - name: restore dependencies run: dotnet restore diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 0279358..41f8279 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,4 +1,5 @@ FROM alpine +ARG VERSION=0.9.1 RUN apk --no-cache add curl gcc icu RUN if [ "$(uname -m)" = "aarch64" ]; then \ @@ -9,7 +10,7 @@ RUN if [ "$(uname -m)" = "aarch64" ]; then \ echo unsupported arch "$(uname -m)"; \ exit 1; \ fi && \ - curl -LO https://github.com/smartbear-devrel/explore-cli/releases/download/0.6.0/explore-cli-linux-musl-$BINARY_ARCH.gz && \ + curl -LO https://github.com/smartbear-devrel/explore-cli/releases/download/${VERSION}/explore-cli-linux-musl-$BINARY_ARCH.gz && \ gunzip explore-cli-linux-musl-$BINARY_ARCH.gz && \ chmod +x explore-cli-linux-musl-$BINARY_ARCH && \ mv explore-cli-linux-musl-$BINARY_ARCH /usr/local/bin/explore-cli && \ diff --git a/Dockerfile.debian b/Dockerfile.debian index 025083b..1cd88de 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -1,5 +1,5 @@ FROM debian:12-slim -ARG VERSION=0.8.2 +ARG VERSION=0.9.1 RUN apt update && apt install -y curl libicu-dev RUN if [ "$(uname -m)" = "aarch64" ]; then \ diff --git a/README.md b/README.md index 8330623..29c2b29 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Simple utility CLI for importing data into API Hub Explore. You will need the following: -- .NET 7.0 (or above). Follow instructions for [Windows](https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net70), [Linux](https://learn.microsoft.com/en-us/dotnet/core/install/linux), or [MacOS](https://learn.microsoft.com/en-us/dotnet/core/install/macos). +- .NET 8.0 (or above). Follow instructions for [Windows](https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net80), [Linux](https://learn.microsoft.com/en-us/dotnet/core/install/linux), or [MacOS](https://learn.microsoft.com/en-us/dotnet/core/install/macos). - A API Hub Explore account, register at https://try.smartbear.com/swaggerhub-explore (if required). ### Install the CLI @@ -368,7 +368,7 @@ From API Hub Explore, navigate to your browser development tools, locate the app You will need the following: -- .NET 7.0 (or above). Follow instructions for [Windows](https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net70), [Linux](https://learn.microsoft.com/en-us/dotnet/core/install/linux), or [MacOS](https://learn.microsoft.com/en-us/dotnet/core/install/macos). +- .NET 8.0 (or above). Follow instructions for [Windows](https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net80), [Linux](https://learn.microsoft.com/en-us/dotnet/core/install/linux), or [MacOS](https://learn.microsoft.com/en-us/dotnet/core/install/macos). ### Setting up diff --git a/src/Explore.Cli/Explore.Cli.csproj b/src/Explore.Cli/Explore.Cli.csproj index 04805ff..436e692 100644 --- a/src/Explore.Cli/Explore.Cli.csproj +++ b/src/Explore.Cli/Explore.Cli.csproj @@ -2,7 +2,8 @@ Exe - net7.0 + net8.0 + Major enable enable true diff --git a/test/Explore.Cli.Tests/Explore.Cli.Tests.csproj b/test/Explore.Cli.Tests/Explore.Cli.Tests.csproj index 7d7666f..40c8b32 100644 --- a/test/Explore.Cli.Tests/Explore.Cli.Tests.csproj +++ b/test/Explore.Cli.Tests/Explore.Cli.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable