Compare commits

...

3 commits

Author SHA1 Message Date
Niklas Mohrin
670d92c8b5
Release v1.5.1 2026-01-24 00:53:17 +01:00
Niklas Mohrin
ffce919049
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 00:53:17 +01:00
Niklas Mohrin
df080b4c55
Update .github files
Checked out b3cd7b1c21 and performed minor
edits.
2026-01-24 00:53:17 +01:00
8 changed files with 103 additions and 89 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,90 +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.54, stable]
toolchain: [stable, 1.54]
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 }}
override: 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
run: |
cargo build --features logging --no-default-features
cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-logging${{ matrix.exe_suffix}}
- uses: actions/upload-artifact@v5
with:
command: build
- name: Build with all features
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
name: tldr-debug-build-${{ matrix.platform }}-rust-${{ matrix.toolchain }}
path: artifacts/
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
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
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- 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
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.54
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
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
override: true
- 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,41 +6,41 @@ 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: |
source ./scripts/upload-asset.sh
# Upload: <token> <repo> <tag> <file> <name>
upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} ${{ matrix.target }}_tealdeer completions_${{ matrix.target }}
upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} completion/${{ matrix.target }}_tealdeer completions_${{ matrix.target }}
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
- 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

@ -1275,7 +1275,7 @@ dependencies = [
[[package]]
name = "tealdeer"
version = "1.5.0"
version = "1.5.1"
dependencies = [
"ansi_term",
"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.5.0"
version = "1.5.1"
include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"]
edition = "2018"

View file

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

View file

@ -49,7 +49,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";
// Note: flag names are specified explicitly in clap attributes
// to improve readability and allow contributors to grep names like "clear-cache"