Skip to content
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

Merged
merged 5 commits into from
Nov 19, 2021
Merged

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Nov 16, 2021

Apparently no patch needed to make it work with MSVC (tested locally)

@jmarrec jmarrec added the enhancement New feature or request label Nov 16, 2021
@jmarrec jmarrec self-assigned this Nov 16, 2021
@jmarrec jmarrec added enhancement New feature or request and removed enhancement New feature or request labels Nov 16, 2021
@jmarrec jmarrec changed the title Add cbor gem to the CLI Add cbor and msgpack gems to the CLI Nov 16, 2021
jmarrec added a commit to NREL/OpenStudio that referenced this pull request Nov 16, 2021
Gemfile Outdated
Comment on lines 25 to 26
gem 'cbor', '0.5.9.6'
gem 'msgpack', '1.4.2'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add cbor and msgpack

Comment on lines +160 to +162
File.open("#{install_dir}/version.txt", 'w') do |f|
f.puts new_file_name
end
Copy link
Collaborator Author

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.

Comment on lines +172 to +192
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
Copy link
Collaborator Author

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

@jmarrec jmarrec changed the title Add cbor and msgpack gems to the CLI Add msgpack gem (not cbor) to the CLI Nov 17, 2021
@tijcolem tijcolem merged commit 9a3ce31 into develop Nov 19, 2021
@tijcolem tijcolem deleted the 4496_Add_cbor_gem branch November 19, 2021 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cbor or msgpack gem to CLI
2 participants