https://github.com/calinradoni/buildnumberinc
Auto-increment build number
https://github.com/calinradoni/buildnumberinc
Last synced: 5 months ago
JSON representation
Auto-increment build number
- Host: GitHub
- URL: https://github.com/calinradoni/buildnumberinc
- Owner: CalinRadoni
- License: mit
- Archived: true
- Created: 2016-08-24T21:38:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-22T18:58:30.000Z (over 6 years ago)
- Last Synced: 2023-07-18T16:42:12.568Z (almost 3 years ago)
- Language: Go
- Size: 2.06 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# BuildNumberInc
__BuildNumberInc__ is an application to auto-increment the build number of a C/C++ project
## Note
This repository is archived because I have no use for this application any more.
## Usage
Add the executable and the arguments to the pre-build step of your IDE.
If the build number is declared as a _#define_ no flags are needed.
If the build number is declared as a _const_ use the __-c__ flag.
If you want to use only LF (and not CRLF) as line endings in the source file use __-r__ flag.
If you want to see the changed build number add the __-v__ flag.
### Example
#### Atollic TrueSTUDIO for ARM
In _project properties_ -> C/C++ Build -> Settings -> Build Steps -> Pre-build steps -> Command
for a _#define_ set:
```
\BuildNumberInc.exe -v \version.h SW_VER_BUILD
```
for a _const_ set:
```
\BuildNumberInc.exe -c -v \version.h verBuildNo_0
```
#### Test file (version.h)
```cpp
#ifndef VERSION_H
#define VERSION_H
#define SW_VER_MAJOR 1
#define SW_VER_MINOR 8
#define SW_VER_BUILD 28 // build number
namespace YourNamespace {
const unsigned int verBuildNo_0 = 14; // a comment
const uint16_t verBuildNo_1 = 27; // another comment
} // namespace
#endif // VERSION_H
```
## Building the package
__BuildNumberInc__ is a simple package so, if you have [Go](https://golang.org/) installed and
added to your path, just type `go build` in the source directory.
## License
__BuildNumberInc__ is released under the [MIT License](https://opensource.org/licenses/MIT).