-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
Pre & Post commands #461
Pre & Post commands #461
Conversation
@xiantang could you review the changes made until now |
So, this time is it in support of the pre command? |
Yes, will work on the post command shortly. |
if err != nil { | ||
t.Fatalf("Should not be fail: %s.", err) | ||
} | ||
err = engine.runPreCmd() |
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.
You should use a real command for integration testing, such as writing a file to the test folder and then checking if the file exists after execution is complete
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.
I don't think the current unit tests can test anything
air_example.toml
Outdated
@@ -6,6 +6,8 @@ root = "." | |||
tmp_dir = "tmp" | |||
|
|||
[build] | |||
# Array of commands to run before each build | |||
pre_cmd = ["echo Hello","echo Air"] |
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.
Separate with spaces
any update? |
Sorry for the delay, I updated the tests hoping that they do a little more this time, unfortunately, I can't ensure that the tests are passing because there is a problem with |
The latest version of GO that I remember has already been fixed. You can try updating your GO version |
I already have the latest version ( 1.21 ) installed, Sorry for being not so helpful but I can start working on post cmd if that's okay! |
Keep going |
sorry for the delay, been busy at work. |
can let me check
…On Wed, Sep 20, 2023 at 12:57 Kareem Ebrahim ***@***.***> wrote:
sorry for the delay, been busy at work.
@xiantang <https://github.com/xiantang> could you check the latest
changes?
—
Reply to this email directly, view it on GitHub
<#461 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIHB3TYDMLYVHOZMZF4SLGLX3JZVDANCNFSM6AAAAAA4DOBUGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
LGTM merged! |
thank you! |
Hmm, I thought post_cmd would run each time after cmd is restarted... it's surprising to call it post_cmd, should've been |
closes #453
New Features
pre_cmd
is added to.air.toml
post_cmd
is added to.air.tom
New behavior
pre_cmd
will be executed one by one before each buildpost_cmd
will be executed upon exiting (i.e. upon hitting ^C)