apigear-io / cli

The ApiGear client as go project
https://apigear.io
MIT License
1 stars 2 forks source link

add filters to studio/template and source doc #37

Open jryannel opened 1 year ago

jryannel commented 1 year ago

add template and studio information as also the soruce document to generated files (e.g. adding some filters)

Slack Message

jryannel commented 1 year ago

The idea is to provide filters which print out cli and studio version information as also the version of the template. And these can be embedded into the template documents, by this we know which exact tool and template version was used.

jryannel commented 1 year ago

The studio or cli version are already embedded into the binary. The template version needs to be recorded somewhere (e.g. git commit and tag and build date). Ideally this would be placed into the rules document and the rules document would be accessible by the template filters.

.Rules.Version
.Rules.Build
.Rules.Commit

We can auto add them using a task file for releasing a template by patching the rules doc using apigear itself, e.g. apigear x patch-rules --version v0.0.0 --build --commit 1e3c