Skip to content

Commit

Permalink
Merge branch 'main' into man-page-update
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrl authored Nov 12, 2023
2 parents 1a79bc2 + 804f408 commit adadc58
Show file tree
Hide file tree
Showing 16 changed files with 409 additions and 230 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.c]
indent_size = 4

[*.{markdown,md}]
trim_trailing_whitespace = false
16 changes: 10 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@

## What does it do?
<Describe the change done>

<Describe the change done>

## Why the change?
<Why was the change done? Why is it required?>

<Why was the change done? Why is it required?>

## How can this be tested?
<How is the best way to test this?>

<How is the best way to test this?>

## Where to start code review?
<Point us to a good place to start reviewing>

<Point us to a good place to start reviewing>

## Relevant tickets?
<Please link any relevant tickets>

<Please link any relevant tickets>

## Questions?

<Ask us anything!>

### Checklist

- [ ] I have checked there aren't any existing PRs open to fix this issue/add this feature.
- [ ] I have compiled the code with `make` and tested the change in an active installation with `sudo make install`.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ jobs:
name: Brew Formula

steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/checkout@v4
- name: Update Homebrew Formula
uses: dawidd6/action-homebrew-bump-formula@v3
with:
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/stale.yml

This file was deleted.

11 changes: 8 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:

steps:

- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -34,5 +33,11 @@ jobs:
- name: Compile
run: make V=1 DEBUG= CC=${{ matrix.compiler }} LD=${{ matrix.compiler }}

- name: Test
- name: Test printing tldr version
run: ./tldr --version

- name: Test printing tldr list
run: ./tldr --list

- name: Test printing tldr page
run: ./tldr tar
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ infer-out
*.i*86
*.x86_64
*.hex

# VSCode
.vscode
78 changes: 74 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,107 @@ Deprecated features will be kept for any following maintenance release, and
will be removed after two major releases.

## [Unreleased]

## v1.6.0 - 2023-05-09

### Added

- Add support for auto updating local data if too old

### Fixed

- Fix make finding lib directories with M1 Homebrew

## v1.5.0 - 2022-07-03

### Added

- Add fish completion for `--list`, `--linux`, `--osx`, and `--sunos` flags

### Fixed

- Fix typo of "database" in the usage output
- Fix fish completion not escaping characters
- Make fish completion reflect actual usage of `tldr` better

## v1.4.3 - 2022-04-11

### Fixed

- Fix segfault on trying to update cache
- Fix segfault when failing to open cache directory
- Bubble error code appropriately when using `--list`

## v1.4.2 - 2021-11-13

### Fixed

- Fix version not being updated in source code

## v1.4.1 - 2021-11-12

### Fixed

- Fix wrong directory name when extracting files from zip cache download

## v1.4.0 - 2021-11-07

### Added

- Add fish completion (see README.md for details)
- Improve output messages for various options
- Add `--list option`
- Add Windows as available platform
- Allow using `TLDR_CACHE_DIR` env var to specify cache directory
- Add `--linux`, `--osx`, and `--sunos` flags as shorthand for `--platform=<platform>`
- Add yum support to the `./deps.sh` script

### Fixed

- Do not check last cache update date when updating cache
- Add yes flag to apt install in ./deps.sh script
- Add blank line at end of output
- Remove `-ansi` flag when compiling
- Use `tldr` instead of `tldr-pages` as name for cache folder

### Miscellaneous

- Rename repository from `tldr-cpp-client` to `tldr-c-client`
- Move from Travis-CI to GitHub actions

## v1.3.0 - 2016-09-09

### Added

- Initial release in core homebrew repository
- Add zsh / bash completion (see README.md for details)

### Fixed

- Fix compiling on old Linux distributions


## v1.2.0 - 2016-04-06

### Added

- Download local database at first run
- Add SunOS as supported tldr platform
- Add --clear-cache option, to clear the local database


## v1.1.0 - 2016-01-18

### Added

- Error messages

### Fixed
- Typos

- Typos

## v1.0.0 - 2015-12-30
- Initial release

- Initial release

<!-- This is an example how a section should look like:
Expand All @@ -60,4 +131,3 @@ will be removed after two major releases.
- Mentioning any security vulnarabilities
-->

40 changes: 30 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,43 @@ endif
HAS_GIT := $(shell type git > /dev/null 2>&1 && echo "1" || echo "0")
IS_GITREPO := $(shell [ -d .git ] && echo "1" || echo "0")
ifeq (0,$(filter 0,$(HAS_GIT) $(IS_GITREPO)))
VER := v1.3.0
VER := v1.6.0
else
VER := $(shell git describe --tags --always --dirty)
endif

# Preprocessor Flags
# Set Flags
ALL_CPPFLAGS := $(CPPFLAGS) -DVERSION='"$(VER)"'
ALL_LDFLAGS := $(LDFLAGS) -L/usr/lib
ALL_LDLIBS := -lc -lm -lcurl -lzip
ALL_CPPFLAGS += -D_GNU_SOURCE
ALL_CPPFLAGS += $(shell pkg-config --cflags libzip)

ALL_CPPFLAGS += -I/usr/include
ALL_CPPFLAGS += -I/usr/local/include
ALL_CPPFLAGS += -I/usr/local/opt/curl/include
ALL_CPPFLAGS += -I/usr/local/opt/libzip/include

# Linker Flags
ALL_LDFLAGS := $(LDFLAGS) -L/usr/lib
ALL_LDFLAGS += -L/usr/local/lib
ALL_LDFLAGS += -L/usr/local/opt/curl/lib
ALL_LDFLAGS += -L/usr/local/opt/libzip/lib
ALL_LDLIBS := -lc -lm -lcurl -lzip
ifneq (,$(wildcard /opt/homebrew/.*))
ALL_CCPFLAGS += -I/opt/homebrew/include
ALL_CPPFLAGS += -I/opt/homebrew/lib
endif

ifneq (,$(wildcard /usr/local/opt/curl/.*))
ALL_CPPFLAGS += -I/usr/local/opt/curl/include
ALL_LDFLAGS += -L/usr/local/opt/curl/lib
endif
ifneq (,$(wildcard /opt/homebrew/opt/curl/.))
ALL_CPPFLAGS += -I/opt/homebrew/opt/curl/include
ALL_LDFLAGS += -L/opt/homebrew/opt/curl/lib
endif

ifneq (,$(wildcard /usr/local/opt/libzip/.))
ALL_CPPFLAGS += -I/usr/local/opt/libzip/include
ALL_LDFLAGS += -L/usr/local/opt/libzip/lib
endif
ifneq (,$(wildcard /opt/homebrew/opt/libzip/.))
ALL_CPPFLAGS += -I/opt/homebrew/opt/libzip/include
ALL_LDFLAGS += -L/opt/homebrew/opt/libzip/lib
endif

# Source, Binaries, Dependencies
SRC := $(shell find $(SRCDIR) -type f -name '*.c')
Expand Down Expand Up @@ -126,6 +142,10 @@ install: all $(MANSRC)
$(INSTALL) -d $(MANPATH)
$(INSTALL) $(MANSRC) $(MANPATH)

uninstall:
$(RM) $(PREFIX)/bin/$(TARGET)
$(RM) $(MANPATH)/$(TARGET).1

clean:
$(RM) $(OBJ) $(DEP) $(BIN)
$(RMDIR) $(OBJDIR) $(BINDIR) 2> /dev/null; true
Expand Down
Loading

0 comments on commit adadc58

Please sign in to comment.