Compare commits

...

3 commits

Author SHA1 Message Date
Niklas Mohrin
5ddc86ee74
Release v1.6.2 2026-01-24 01:03:15 +01:00
Niklas Mohrin
22d0889d47
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.
2026-01-24 01:03:15 +01:00
Niklas Mohrin
4d53377151
Update .github files
Checked out b3cd7b1c21 and performed minor
edits.
2026-01-24 01:03:15 +01:00
8 changed files with 102 additions and 90 deletions

6
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

View file

@ -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

View file

@ -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

View file

@ -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: <token> <repo> <tag>
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: |

2
Cargo.lock generated
View file

@ -1099,7 +1099,7 @@ dependencies = [
[[package]]
name = "tealdeer"
version = "1.6.1"
version = "1.6.2"
dependencies = [
"anyhow",
"app_dirs2",

View file

@ -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"

View file

@ -1,4 +1,4 @@
tealdeer 1.6.1
tealdeer 1.6.2
Danilo Bargen <mail@dbrgn.ch>, Niklas Mohrin <dev@niklasmohrin.de>
A fast TLDR client

View file

@ -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.