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

Update the build.release task #1454

Merged
merged 3 commits into from
Apr 2, 2021
Merged

Update the build.release task #1454

merged 3 commits into from
Apr 2, 2021

Conversation

jwoertink
Copy link
Member

Purpose

Fixes #1387

Description

We should now be building all binaries to the bin/ dir. When we updated to do this, the build.release task was missed. This also uses the output property from LuckyCli.

One strange thing I couldn't figure out is that log "Building binary with '#{command}" prints out to the screen now 🤔 Even though it's a IO::Memory, it still seems to print just that one message. It doesn't print out the other one...

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

@@ -6,20 +6,19 @@ class Build::Release < LuckyCli::Task

summary "Compile app for production"

def initialize(@io : IO = STDOUT, @error_io : IO = STDERR)
end
property error_io : IO = STDERR
Copy link
Member Author

Choose a reason for hiding this comment

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

This should be added in to LuckyCli::Task directly to match up with output.


def call
command = "crystal build --release src/start_server.cr"
command = "crystal build --release src/start_server.cr -o bin/start_server"

log "Building binary with '#{command}"
Copy link
Member Author

Choose a reason for hiding this comment

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

Why does this print out, but the one below doesn't?

Screen Shot 2021-04-02 at 2 46 41 PM

Copy link
Member

Choose a reason for hiding this comment

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

Maybe try adding an else and check if the process isn't completing successfully?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah. Good call. It is failing.. 🤔 but I guess why.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, but that still doesn't explain why IO::Memory is printing to STDOUT 🤨

Copy link
Member

Choose a reason for hiding this comment

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

Ohh, it's actually the second spec that is printing to stdout, it doesn't have it's output changed, only error_io

Copy link
Member Author

Choose a reason for hiding this comment

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

ooohhhh 😂 yup. That fixes it. Thanks!

@jwoertink jwoertink merged commit d6b16a1 into master Apr 2, 2021
@jwoertink jwoertink deleted the issues/1387 branch April 2, 2021 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The lucky build task should emit to bin
2 participants