-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add msgpack gem (not cbor) to the CLI #51
Conversation
…on OpenStudio's side
1efadc7
to
09bab57
Compare
Gemfile
Outdated
gem 'cbor', '0.5.9.6' | ||
gem 'msgpack', '1.4.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add cbor and msgpack
File.open("#{install_dir}/version.txt", 'w') do |f| | ||
f.puts new_file_name | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write the tar.gz name into a text file at the root of the extracted dir, so we can get it from CMake to ensure we always use the right version when switching branches: checking that we have the .tar.gz locally and it has the right MD5sum doesn't suffice to tell that the extracted directory is the right now, as you may have multiple openstudio3-gems tar.gzs.
puts "Also, you will need to update OpenStudio/CMakeLists.txt with the new file name and the md5 hash (call `md5 #{new_file_name}` or `md5sum #{new_file_name}` to get hash)" | ||
puts | ||
cmd = nil | ||
if platform_prefix == 'Windows' | ||
cmd = "certutil -hashfile \"#{new_file_name}\" MD5" | ||
else | ||
cmd = "md5sum \"#{new_file_name}\"" | ||
end | ||
|
||
Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr| | ||
stdout = stdout.gets(nil) | ||
stderr = stderr.gets(nil) | ||
result = wait_thr.value.exitstatus | ||
if result == 0 | ||
puts "#{stdout}" | ||
else | ||
puts "Something went wrong, exitcode=#{result}" | ||
puts "stdout=#{stdout}" | ||
puts "stderr=#{stderr}" | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bake the md5sum spit out into the rake make_package
for convenience when building locally
Apparently no patch needed to make it work with MSVC (tested locally)