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 release task #602
Add release task #602
Conversation
Awesome @HarrisonB Thanks so much for taking this on! It may take us a couple days to look at this but on first glance it looks like a great start. |
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.
The code here looks perfect. Could you add a spec for it to make sure that it saves the binary? The tricky part will be cleaning up afterward I think. Here is a rough idea of what it might look like:
# Uses the CleanupHelper. Remember to include it: https://github.com/luckyframework/lucky/blob/master/spec/support/cleanup_helper.cr#L6
with_cleanup do
File.write "./src/server.cr", "1 + 1"
Release.new.call
File.exists?("src.server")
end
I think something simple like this is sufficient to make sure the task works. If you want to test the output you could pass in a IO::Memory
to initialize, but I don't think that is necessary. It's up to you! Let me know if you have any questions or if I didn't explain things clearly
File.exists?("./server").should be_false | ||
end | ||
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.
Nice specs!
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.
Thanks 😄
Thanks for tackling this! |
Fixes #594
Not exactly sure how to add tests for this (though I'm not sure if they're necessary).