use Provider.UserAgent to generate the user agent header#552
Draft
jedelson-pagerduty wants to merge 1 commit intoPagerDuty:masterfrom
Draft
use Provider.UserAgent to generate the user agent header#552jedelson-pagerduty wants to merge 1 commit intoPagerDuty:masterfrom
jedelson-pagerduty wants to merge 1 commit intoPagerDuty:masterfrom
Conversation
79b9fea to
ea2afe1
Compare
also updating goreleaser configuration to capture version and commit in a way that is easily accessible by the provider configure code
ea2afe1 to
53dbfa4
Compare
| } | ||
|
|
||
| p.ConfigureFunc = func(d *schema.ResourceData) (interface{}, error) { | ||
| terraformVersion := p.TerraformVersion |
Contributor
Author
There was a problem hiding this comment.
Note that the only thing that was happening in ConfigureFunc was normalizing the Terraform version. That should not be necessary when using Provider.UserAgent so I just moved the body of providerConfigure here. I didn't see a reason to have a separate function.
| - -trimpath | ||
| ldflags: | ||
| - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}' | ||
| - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X github.com/terraform-providers/terraform-provider-pagerduty/pagerduty.version={{.Version}} -X github.com/terraform-providers/terraform-provider-pagerduty/pagerduty.commit={{.Commit}}' |
Contributor
Author
There was a problem hiding this comment.
main.version and main.commit could be removed here -- those variables don't exist so the current (before this change) configuration is kind of a no-op.
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.
also updating goreleaser configuration to capture version and commit in a way that is easily accessible by the provider configure code
Depends upon heimweh/go-pagerduty#97 (and updating the vendor copy here), so setting this to draft until that is merged.