Repository navigation
Add version command - #12
Merged
Merged
Conversation
btromanova
reviewed
Dec 27, 2018
btromanova
approved these changes
Dec 28, 2018
`astro version` will print the version of astro at the command line. Version information will be set using ldflags at release time. For more information, see: https://stackoverflow.com/questions/11354518/golang-application-auto-build-versioning Automated releasing will be implemented in a separate PR.
btromanova
force-pushed
the
add-version-command
branch
from
October 2, 2019 10:03
54691ae to
ec8314c
Compare
dansimau
commented
Oct 2, 2019
Comment on lines
+6
to
+10
| * Propagate SIGINT and SIGTERM to terraform processes (#49) | ||
| * Support detach flag with terraform 0.12 (#45) | ||
| * Fix plan output for terraform 0.12 (#41) | ||
| * Fix bug in initialization of allowed values (#43) | ||
| * Don't pass varialbes to modules that don't delcare them (#40) |
Contributor
Author
There was a problem hiding this comment.
Can we put this in a separate PR? They have nothing to do with this one.
(Also, typo: "variables")
dansimau
commented
Oct 2, 2019
| @@ -0,0 +1,62 @@ | |||
| /* | |||
| * Copyright (c) 2018 Uber Technologies, Inc. | |||
dansimau
commented
Oct 2, 2019
|
|
||
| // compiles the astro binary and returns the path to it. | ||
| func compileAstro(dir string) (string, error) { | ||
| func compileAstro(dir string, ldflags []string) (string, error) { |
Contributor
Author
There was a problem hiding this comment.
Let's just make this buildFlags []string and allow people to pass arbitrary flags.
dansimau
commented
Oct 2, 2019
Comment on lines
+233
to
+235
| if err != nil { | ||
| panic(err) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
In tests just do:
require.NoError(t, err)
dansimau
commented
Oct 2, 2019
Comment on lines
+245
to
+247
| if err != nil { | ||
| panic(err) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
require.NoError(t, err)
| assert.Equal(t, "astro version 1.2.3 (ab123) built 2019-01-01T10:00:00\n", stdoutBytes.String()) | ||
| } | ||
|
|
||
| func TestPlanErorrsWithoutConfig(t *testing.T) { |
Contributor
Author
There was a problem hiding this comment.
Should we test apply too?
dansimau
commented
Oct 2, 2019
| func TestApplyErorrsWithoutConfig(t *testing.T) { | ||
| dir, err := ioutil.TempDir("/tmp", "astro-tests") | ||
| require.NoError(t, err) | ||
| defer os.RemoveAll(dir) |
Contributor
Author
There was a problem hiding this comment.
Same here.
You could also make these two tests into a table test (if you wanted... 😉 )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
astro versionwill print the version of astro at the command line.Version information will be set using ldflags at release time. For more
information, see:
https://stackoverflow.com/questions/11354518/golang-application-auto-build-versioning
Automated releases will be implemented in a separate PR (#14).