Add mrbgem version field to lock file

parent b68818a8
...@@ -43,7 +43,7 @@ module MRuby ...@@ -43,7 +43,7 @@ module MRuby
include Rake::DSL include Rake::DSL
include LoadGems include LoadGems
attr_accessor :name, :bins, :exts, :file_separator, :build_dir, :gem_clone_dir attr_accessor :name, :bins, :exts, :file_separator, :build_dir, :gem_clone_dir
attr_reader :libmruby_objs, :gems, :toolchains attr_reader :libmruby_objs, :gems, :toolchains, :gem_dir_to_repo_url
attr_writer :enable_bintest, :enable_test attr_writer :enable_bintest, :enable_test
alias libmruby libmruby_objs alias libmruby libmruby_objs
...@@ -90,6 +90,7 @@ module MRuby ...@@ -90,6 +90,7 @@ module MRuby
@enable_test = false @enable_test = false
@enable_lock = true @enable_lock = true
@toolchains = [] @toolchains = []
@gem_dir_to_repo_url = {}
MRuby.targets[@name] = self MRuby.targets[@name] = self
end end
......
...@@ -113,6 +113,7 @@ module MRuby ...@@ -113,6 +113,7 @@ module MRuby
end end
if lock_enabled? if lock_enabled?
@gem_dir_to_repo_url[gemdir] = url unless params[:path]
locks[url] = { locks[url] = {
'url' => url, 'url' => url,
'branch' => git.current_branch(gemdir), 'branch' => git.current_branch(gemdir),
......
...@@ -91,6 +91,9 @@ module MRuby ...@@ -91,6 +91,9 @@ module MRuby
build.libmruby_objs << @objs build.libmruby_objs << @objs
instance_eval(&@build_config_initializer) if @build_config_initializer instance_eval(&@build_config_initializer) if @build_config_initializer
repo_url = build.gem_dir_to_repo_url[dir]
build.locks[repo_url]['version'] = version if repo_url
end end
def setup_compilers def setup_compilers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment