Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update readme with C++ support #8

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
# project-version

A little POSIX shell script that generates a C header containing the version information (Major Minor etc...) of a Git based repository.
A little POSIX shell script that generates a C/C++ header or a Cmake variable file containing the version information (Major Minor etc...) of a Git based repository.

The script simply parses the `git describe` command to extract the firmware information, and create the corresponding defines.

## Compatibility

### Genuine C/C++ project
### C project

The script will generate a C header file.

```sh
./project-version.sh -o project/include/version.h
./project-version.sh -f h -o project/include/version.h
```

### Zephyr project
### C++ project

The script will generate the cmake version file.
The script will generate a C++ header file.

```sh
./project-version.sh -f zephyr -o cmake-project/VERSION
./project-version.sh -f hpp -o project/include/version.hpp
```

### Cmake project

The script will generate a cmake variable file.

```sh
./project-version.sh -f cmake -o cmake-project/VERSION
```

## Requirements
Expand Down