Comments (5)
Before doing this, it would be worth looking at Catch2's release scripts, which are in Python and really nice and clean, for example:
https://github.com/catchorg/Catch2/blob/master/scripts/minorRelease.py
You don't have to even work out what the next version number will be. You just say "I'm doing a minor release" (or major, or patch) and it takes care of all the appropriate incrementation.
from approvaltests.cpp.
How about using CMake
to generate the version number?
https://cmake.org/cmake/help/latest/guide/tutorial/index.html#adding-a-version-number-and-configured-header-file
from approvaltests.cpp.
How about using
CMake
to generate the version number?
https://cmake.org/cmake/help/latest/guide/tutorial/index.html#adding-a-version-number-and-configured-header-file
That's one possibility...
We'd still need to get the version number in to CMake in the first place, and this script updates the version number in various places:
https://github.com/approvals/ApprovalTests.cpp/blob/master/build/build_hpp.sh
So also a possibility is to make build_hpp.sh
to edit in the version number directly...
from approvaltests.cpp.
Yeah. Probably makes more sense to go direct with build_hpp.sh
since there are several other things being modified.
from approvaltests.cpp.
This is now implemented, using these steps:
- ApprovalTests/ApprovalTestsVersion.h is machine-generated during each release, and contains the version number
- That file is included during development in ApprovalTests/ApprovalTests.hpp
- The header Blocker.h seems to always be include first in the single header, at least going back to v.3.3.0, so by including this new header in Blocker.h, we ensure that the information from this file will always appear at the top of the generated single-header file.
The generated code looks like this:
#ifndef APPROVALTESTS_CPP_APPROVALTESTSVERSION_H
#define APPROVALTESTS_CPP_APPROVALTESTSVERSION_H
#define APPROVALTESTS_VERSION_MAJOR 8
#define APPROVALTESTS_VERSION_MINOR 0
#define APPROVALTESTS_VERSION_PATCH 0
#define APPROVALTESTS_VERSION_STR "8.0.0"
#define APPROVALTESTS_VERSION \
(APPROVALTESTS_VERSION_MAJOR * 10000 + APPROVALTESTS_VERSION_MINOR * 100 + \
APPROVALTESTS_VERSION_PATCH)
#endif //APPROVALTESTS_CPP_APPROVALTESTSVERSION_H
from approvaltests.cpp.
Related Issues (20)
- Add clang12 CI build HOT 1
- Provide a script to allow users to generate the single header from the current code, without doing a release HOT 9
- Add a documentation example showing how to obtain ApprovalTests.cpp via CPM.cmake HOT 1
- Add vcpkg to our release process HOT 2
- Document how to use Approval Tests with vcpkg HOT 1
- Bullet lists not rendered correcting on Read the Docs version of our documentation HOT 3
- Add a copyright statement to the released single header HOT 1
- GitHub Actions: Don't run scheduled tasks on forked repos
- Using kdiff3 as diff tool, user has to specify name of output file after merge
- cygwin CI build hangs for 6 hours then fails HOT 5
- warning C4459 in MSVC with /W4 HOT 1
- Does not compile with clang13 due to -Werror/-Wdeprecated-copy-with-dtor HOT 2
- Ninja + Catch2 + mingw64
- useApprovalsSubdirectory() doesn't create the output directory in the expected location HOT 3
- "Unable to create directory" - unable to run test build with mingw provided by qt-installer HOT 5
- with CppUTest: `ApprovalMismatchException` suppresses other tests output HOT 4
- add `code -d {Received} {Approved}` to Reporters list
- Catch2 integration does not handle Generators inside sections HOT 1
- Catch2 v3 integration HOT 5
- Bug with {fmt} integration HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from approvaltests.cpp.