summaryrefslogtreecommitdiff
path: root/version.h
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-04-22 21:23:37 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-04-22 21:27:34 +0900
commit5da52d1210625fb00acd573b3f32281b4bde1730 (patch)
treeb21d24b02dfc1da995bc280142e2aaffcedf30ba /version.h
parentdd0b516399f1e009667a99e815bf86c6a1245ee5 (diff)
Migrate RUBY_VERSION/RUBY_DESCRIPTION to Git
from Subversion. This behavior is tentative and not discussed well. The point of discussion will be just the length of commit hash, and I thought we should include this kind of change in 2.7.0-preview1 release even before the length is fixed yet. Let's discuss that afterwards and fix it later as needed. Naruse suggested that length=10 is very unlikely to cause conflict, and thus it's used by email notification and rubyci now. This behavior is in favor of that for now.
Diffstat (limited to 'version.h')
-rw-r--r--version.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/version.h b/version.h
index cafcf7388c..7990f38fd8 100644
--- a/version.h
+++ b/version.h
@@ -45,20 +45,18 @@
#ifndef RUBY_REVISION
# include "revision.h"
#endif
-#ifndef RUBY_REVISION
-# define RUBY_REVISION 0
-#endif
-#if RUBY_REVISION
+#ifdef RUBY_REVISION
# if RUBY_PATCHLEVEL == -1
# ifndef RUBY_BRANCH_NAME
# define RUBY_BRANCH_NAME "trunk"
# endif
-# define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "STRINGIZE(RUBY_REVISION)
+# define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "RUBY_REVISION
# else
-# define RUBY_REVISION_STR " revision "STRINGIZE(RUBY_REVISION)
+# define RUBY_REVISION_STR " revision "RUBY_REVISION
# endif
#else
+# define RUBY_REVISION "HEAD"
# define RUBY_REVISION_STR ""
#endif