-
Notifications
You must be signed in to change notification settings - Fork 226
Add a cobra PostRunE
to save generation metadata
#90
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
Add a cobra PostRunE
to save generation metadata
#90
Conversation
Output file example: ack_generate_info:
build_date: "2021-06-16T23:37:20Z"
build_hash: 7c95857954866cfd7f87576cc7abfe26b40c0ee7
go_version: go1.16.4 linux/amd64
version: v0.0.0
api_directory_checksum: 4ffda010495d8ff251f0959fbc4b23d22d4a4615
api_version: v1alpha1
aws_sdk_go_version: v1.35.35
generator_config_info:
file_checksum: f31970ae673c4e8d77bf66ed09ec7a34f76569f2
original_file_name: generator.yaml
last_modification:
reason: API generation
timestamp: 2021-06-16 23:51:34.850963058 +0000 UTC |
5959cf4
to
7c95857
Compare
PostRunE
to save generation metadata
0ec7d18
to
99b7cec
Compare
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.
great stuff, @a-hilaly :) Few minor suggestions/requests for you inline but this is awesome!
99b7cec
to
50f9f7e
Compare
@jaypipes @RedbackThomson if all looks good, can we give this PR a manual merge? i think that we should keep the LDFLAGS modifications separated from the generation metadata stuff |
pkg/generate/ack/output/metadata.go
Outdated
// express or implied. See the License for the specific language governing | ||
// permissions and limitations under the License. | ||
|
||
package output |
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.
Sorry if I wasn't clear... I meant can we put this file into pkg/generate/ack
instead of pkg/generate/ack/output
?
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.
Gotcha! Moved to pkg/generate/ack/output.go
50f9f7e
to
5736382
Compare
…API directory - Add an output files containing utilities and functions to create/save the generation metadata files
5736382
to
1f90f1a
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Hilaly, jaypipes The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue aws-controllers-k8s/community#809
Description of changes:
This patch adds a cobra
PostRunE
function that writes generatorparameters, output metadata and generated files checksum, to a
file within the API versions directory.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.