From 8e7a3a4df16646e097c7f52432e75f21e3a36861 Mon Sep 17 00:00:00 2001 From: take-cheeze Date: Thu, 22 Aug 2019 03:03:24 +0900 Subject: Take commit hash of mruby too --- Rakefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 70dce2e46..6d8382f74 100644 --- a/Rakefile +++ b/Rakefile @@ -126,7 +126,19 @@ task :all => depfiles do print_build_summary end - locks_result = { 'builds' => {} } + require 'mruby/source' + + locks_result = { + 'mruby_version' => { + 'version' => MRuby::Source::MRUBY_VERSION, + 'release_no' => MRuby::Source::MRUBY_RELEASE_NO + }, + 'builds' => {} + } + if File.exist? "#{MRUBY_ROOT}/.git" + locks_result['mruby_version']['git_commit'] = `git --git-dir '#{MRUBY_ROOT}/.git' --work-tree '#{MRUBY_ROOT}' rev-parse --verify HEAD`.strip + end + MRuby.each_target do locks_result['builds'][name] = locks end -- cgit v1.2.3