-
Notifications
You must be signed in to change notification settings - Fork 4
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
Deprecate Script #49
Deprecate Script #49
Conversation
- Pulled config parsing code out into its own function. - Starting warning the user that 'script' is deprecated and they should start using 'build'
Removed '-race' from the snag yaml as it causes tests to take quite a while. Having travis do the heavy lifting instead of doing it locally
// if script has something, tell the user it's deprecated | ||
// and set whatever its contents are to build | ||
if len(c.Script) != 0 { | ||
fmt.Println("The use of 'script' in the yaml file has been deprecated and will be removed in the future.") |
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.
What about adding a deprecation to the config so that the builder displays the message on every cleanup? That way we don't have to sleep at all?
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 like that better. That way they always see it and get reminded that we're going to pull the plug.
I see some sort of deprecation message on the config struct which we build while parsing the config. The builder would then check to see if it is set and then output it. What do you think?
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.
That's fine by me 👍
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.
1ffe96b
to
9181f5a
Compare
f, err := os.Create(".snag.yml") | ||
require.NoError(t, err, "could not create snag.yml") | ||
|
||
_, err = f.WriteString(content) |
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.
Don't we have to close the file after writing the string?
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.
PR deprecates the
script
tag on the.snag.yml
as per conversations on #48 . Also added some tests on the parsing side of things.