ci_conf.libshit.rb (1272B)
1 cond = -> { opt.project == 'libshit' } 2 3 step :libshit_opts, always_after: :default_values, before: :final_opts, 4 cond: cond do 5 opt.libshit_translate_yaml = ![false, "false", "no"].include?(opt.libshit_translate_yaml) 6 opt.executables = opt.mode == 'rel' ? [] : ['libshit-tests'] 7 opt.test_executable = 'libshit-tests' 8 9 opt.yaml_cpp_url = 'https://git.neptards.moe/neptards/yaml-cpp.git' 10 opt.yaml_cpp_revision = '8f79d2f39d6b8833274d179c460fa86bba7391a8' 11 end 12 13 step :libshit_prepare, always_after: :default_values, 14 after: [:libshit_opts, :prepare_checkout], before: :final_opts, cond: cond do 15 # can't be in cond, because it is filled by :libshit_opts 16 next unless opt.libshit_translate_yaml 17 18 dir = File.join opt.tools_dir, '../misc/yaml-cpp' 19 unless Dir.exist? dir 20 run File.dirname(dir), 'git', 'clone', opt.yaml_cpp_url, 'yaml-cpp', 21 '--reference-if-able', '/home/build/git' 22 end 23 24 unless maybe_run dir, 'git', 'checkout', opt.yaml_cpp_revision 25 run dir, 'git', 'fetch' 26 run dir, 'git', 'checkout', opt.yaml_cpp_revision 27 end 28 29 unless run_capture(dir, 'git', 'branch', '--show-current').empty? 30 fail "Specified git revision #{opt.yaml_cpp_revision.inspect} is not a commit/tag" 31 end 32 33 env.LIBSHIT_HAS_YAML_CPP_IN_MISC=1 34 end