Skip to content

Commit b621475

Browse files
author
Charlie Somerville
committed
add a RUBY_PATCHLEVEL_SUFFIX which can include branch names
1 parent 3af0de8 commit b621475

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

version.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@
1717
# endif
1818
#endif
1919

20+
#ifdef RUBY_GITHUB_BRANCH
21+
# define RUBY_PATCHLEVEL_SUFFIX "-github"STRINGIZE(RUBY_GITHUB_VERSION)"-"RUBY_GITHUB_BRANCH
22+
#else
23+
# define RUBY_PATCHLEVEL_SUFFIX "-github"STRINGIZE(RUBY_GITHUB_VERSION)
24+
#endif
25+
2026
#if RUBY_PATCHLEVEL == -1
2127
#define RUBY_PATCHLEVEL_STR "dev"
2228
#else
23-
#define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL) "-github"STRINGIZE(RUBY_GITHUB_VERSION)
29+
#define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL) RUBY_PATCHLEVEL_SUFFIX
2430
#endif
2531

2632
#ifndef RUBY_REVISION

0 commit comments

Comments
 (0)