Skip to content

Commit

Permalink
style tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Dec 30, 2024
1 parent 54e1e74 commit 1c9fa17
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/Cmd/Version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,30 @@
#ifndef CABIN_CABIN_PKG_VERSION
# error "CABIN_CABIN_PKG_VERSION is not defined"
#endif

#ifndef CABIN_CABIN_COMMIT_SHORT_HASH
# error "CABIN_CABIN_COMMIT_SHORT_HASH is not defined"
#else
# define COMMIT_SHORT_HASH CABIN_CABIN_COMMIT_SHORT_HASH
#endif

#ifndef CABIN_CABIN_COMMIT_HASH
# error "CABIN_CABIN_COMMIT_HASH is not defined"
#else
# define COMMIT_HASH CABIN_CABIN_COMMIT_HASH
#endif

#ifndef CABIN_CABIN_COMMIT_DATE
# error "CABIN_CABIN_COMMIT_DATE is not defined"
#else
# define COMMIT_DATE CABIN_CABIN_COMMIT_DATE
#endif

const Subcmd VERSION_CMD = //
Subcmd{ "version" }
.setDesc("Show version information")
.setMainFn(versionMain);

#define COMMIT_SHORT_HASH CABIN_CABIN_COMMIT_SHORT_HASH
#define COMMIT_HASH CABIN_CABIN_COMMIT_HASH
#define COMMIT_DATE CABIN_CABIN_COMMIT_DATE

static consteval std::string_view
commitInfo() noexcept {
if (sizeof(COMMIT_SHORT_HASH) <= 1 && sizeof(COMMIT_DATE) <= 1) {
Expand Down

0 comments on commit 1c9fa17

Please sign in to comment.