-
Notifications
You must be signed in to change notification settings - Fork 42
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
use new build version feature #397
Conversation
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, glad they finally added that!
I added a test and found that on our CI it's not working. Still this is an improvement! |
@@ -12,7 +12,7 @@ import ( | |||
) | |||
|
|||
func TestDependabot(t *testing.T) { | |||
err := exec.Command("go", "build", "dependabot.go").Run() | |||
err := exec.Command("go", "build", ".").Run() |
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.
When you build with a file, the version info isn't injected.
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.
Ah, I remember hitting something like this at a prior employer. It was a royal pain to workaround.
@@ -24,7 +24,7 @@ func TestDependabot(t *testing.T) { | |||
engine := &script.Engine{ | |||
Conds: scripttest.DefaultConds(), | |||
Cmds: Commands(), | |||
Quiet: !testing.Verbose(), | |||
Quiet: false, |
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.
Having it always output the failing test is helpful, making it permanent.
Go 1.24 is now injecting the build version into the binary, so we don't need to do this extra work.
I think this may also fix #233, allowing us to ask people to run
dependabot --version
to check to see if they're running an old version of the Dependabot CLI. Currently it does not work if they do thego install
command.Also updated the installation instructions, removed a gist from a former employee.