From 4d53377151857aed911cb45a92a56e2fda9329a7 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sat, 24 Jan 2026 00:59:48 +0100 Subject: [PATCH 1/3] Update .github files Checked out b3cd7b1c216656ea3416a86104363589157477dc and performed minor edits. --- .github/dependabot.yml | 6 +++ .github/workflows/ci.yml | 92 ++++++++++++++++------------------ .github/workflows/gh-pages.yml | 15 +++--- .github/workflows/release.yml | 71 +++++++++++++++----------- 4 files changed, 98 insertions(+), 86 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8ac6b8c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f53a47..7329fc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,92 +1,86 @@ +name: CI on: push: branches: - main + - "v*.x" pull_request: schedule: - cron: '30 3 * * 2' - -name: CI + workflow_dispatch: jobs: test: name: run tests strategy: + fail-fast: false matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: ['1.62', stable] + toolchain: [stable, 1.62.0] + include: + - platform: windows-latest + exe_suffix: .exe runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ matrix.rust }} - profile: minimal - default: true + toolchain: ${{ matrix.toolchain }} + - run: mkdir artifacts - name: Build with default features - uses: actions-rs/cargo@v1 + run: | + cargo build + cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-default${{ matrix.exe_suffix}} + - name: Build with logging and Rustls with webpki roots + run: | + cargo build --features logging,webpki-roots --no-default-features + cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-logging-rustls-webpki${{ matrix.exe_suffix}} + - uses: actions/upload-artifact@v5 with: - command: build - - name: Build with logging and webpki roots - uses: actions-rs/cargo@v1 - with: - command: build - args: --features logging,webpki-roots --no-default-features + name: tldr-debug-build-${{ matrix.platform }}-rust-${{ matrix.toolchain }} + path: artifacts/ - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test -- --test-threads 1 clippy: name: run clippy lints runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true - components: clippy - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --features logging + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy + - name: run clippy lints + run: cargo clippy --features logging fmt: name: run rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true - components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt + - name: run rustfmt + run: cargo fmt --all -- --check docs: name: build docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Setup mdBook - uses: peaceiris/actions-mdbook@v1 + uses: peaceiris/actions-mdbook@v2 with: mdbook-version: '0.4.4' - - uses: actions-rs/toolchain@v1 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@master with: - toolchain: stable - profile: minimal - default: true + toolchain: stable - name: Build - uses: actions-rs/cargo@v1 - with: - command: build + run: cargo build - name: Ensure that docs can be built run: cd docs && mdbook build - name: Generate usage string diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c32ec71..8746d42 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,25 +1,24 @@ -name: github pages - +name: GitHub Pages on: push: - branches: - - main + tags: + - "v[1-9]*" # push events matching `v` followed by anything larger than 0, e.g. v1.0, v20.15.10 jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Setup mdBook - uses: peaceiris/actions-mdbook@v1 + uses: peaceiris/actions-mdbook@v2 with: mdbook-version: '0.4.4' - run: cd docs && mdbook build - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/book diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e42acc..539f2ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,4 @@ +name: Release on: push: tags: @@ -5,25 +6,25 @@ on: jobs: create-release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Create release for tag if: startsWith(github.ref, 'refs/tags/') run: | source ./scripts/upload-asset.sh # Create: - create_release ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} "Tealdeer version ${GITHUB_REF#refs/*/v}.\n\nFor the full changelog, see https://github.com/dbrgn/tealdeer/blob/main/CHANGELOG.md.\n\nBinaries were generated automatically in CI, and are therefore unsigned. For a fully trusted release, please build from source." + create_release ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} "Tealdeer version ${GITHUB_REF#refs/*/v}.\n\nFor the full changelog, see https://github.com/tealdeer-rs/tealdeer/blob/main/CHANGELOG.md.\n\nBinaries were generated automatically in CI, and are therefore unsigned. For a fully trusted release, please build from source." upload-completions: needs: - create-release - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: target: ["bash", "fish", "zsh"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Upload completion if: startsWith(github.ref, 'refs/tags/') run: | @@ -34,12 +35,12 @@ jobs: upload-license: needs: - create-release - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: target: ["MIT", "APACHE"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Upload license if: startsWith(github.ref, 'refs/tags/') run: | @@ -48,12 +49,14 @@ jobs: upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} LICENSE-${{ matrix.target }} LICENSE-${{ matrix.target }}.txt build-linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: include: - arch: "x86_64" libc: "musl" + - arch: "aarch64" + libc: "musl" - arch: "i686" libc: "musl" - arch: "armv7" @@ -63,42 +66,50 @@ jobs: - arch: "arm" libc: "musleabihf" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Pull Docker image run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} - name: Build in Docker run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release - name: Strip binary run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v5 with: name: "tealdeer-linux-${{ matrix.arch }}-${{ matrix.libc }}" path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr" build-macos: - runs-on: macos-11 + runs-on: macos-latest + strategy: + matrix: + include: + - arch: "x86_64" + - arch: "aarch64" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + targets: "${{ matrix.arch }}-apple-darwin" - name: Build - uses: actions-rs/cargo@v1 + run: cargo build --release --target ${{ matrix.arch }}-apple-darwin + - uses: actions/upload-artifact@v5 with: - command: build - args: --release --target x86_64-apple-darwin --no-default-features --features webpki-roots - - uses: actions/upload-artifact@v2 - with: - name: "tealdeer-macos-x86_64" - path: "target/x86_64-apple-darwin/release/tldr" + name: "tealdeer-macos-${{ matrix.arch }}" + path: "target/${{ matrix.arch }}-apple-darwin/release/tldr" build-windows: - runs-on: windows-2022 + runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - name: Build - uses: actions-rs/cargo@v1 + - uses: actions/checkout@v5 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@master with: - command: build - args: --release --target x86_64-pc-windows-msvc - - uses: actions/upload-artifact@v2 + toolchain: stable + - name: Build + run: cargo build --release --target x86_64-pc-windows-msvc + - uses: actions/upload-artifact@v5 with: name: "tealdeer-windows-x86_64-msvc" path: "target/x86_64-pc-windows-msvc/release/tldr.exe" @@ -109,20 +120,22 @@ jobs: - build-linux - build-macos - build-windows - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: target: - linux-x86_64-musl + - linux-aarch64-musl - linux-i686-musl - linux-armv7-musleabihf - linux-arm-musleabi - linux-arm-musleabihf - macos-x86_64 + - macos-aarch64 - windows-x86_64-msvc steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 + - uses: actions/checkout@v5 + - uses: actions/download-artifact@v6 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') run: | From 22d0889d4709b1cac4bdc37389d06a933a6b4d85 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sat, 24 Jan 2026 00:00:20 +0100 Subject: [PATCH 2/3] Update `ARCHIVE_URL` When this code was written, the client specification instructed clients that they MUST download pages from the tldr.sh domain. However, this domain was deprecated and shut down in December 2025. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8f601e4..e2c086f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,7 +55,7 @@ const APP_INFO: AppInfo = AppInfo { name: NAME, author: NAME, }; -const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; +const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/releases/latest/download/tldr.zip"; /// The cache should be updated if it was explicitly requested, /// or if an automatic update is due and allowed. From 5ddc86ee74103438e406ae8da0db4fdd8e1089c1 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sat, 24 Jan 2026 01:01:36 +0100 Subject: [PATCH 3/3] Release v1.6.2 --- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/src/usage.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index baf16a6..ae2c1ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1099,7 +1099,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.6.1" +version = "1.6.2" dependencies = [ "anyhow", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index de29b01..a93dcd4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" -version = "1.6.1" +version = "1.6.2" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png"] rust-version = "1.62" edition = "2021" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 09edc5e..14d5bd4 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.6.1 +tealdeer 1.6.2 Danilo Bargen , Niklas Mohrin A fast TLDR client