Skip to content

Commit

Permalink
validator: add tag prefix to seperate cli tags from schema tags
Browse files Browse the repository at this point in the history
  • Loading branch information
tsloughter committed Aug 20, 2024
1 parent bfd845a commit cb25f5c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ on:
pull_request:
push:
tags:
- '**[0-9]+.[0-9]+.[0-9]+*'
- 'validator**[0-9]+.[0-9]+.[0-9]+*'

jobs:
# Run 'cargo dist plan' (or host) to determine what tasks we need to do
Expand Down
2 changes: 2 additions & 0 deletions dist.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-
install-path = ["$OTEL_CONFIG_VALIDATOR_HOME/bin", "~/.local/bin"]
# Publish jobs to run in CI
pr-run-mode = "plan"
# A prefix git tags must include for cargo-dist to care about them
tag-namespace = "validator"
# Whether to install an updater program
install-updater = false

10 changes: 10 additions & 0 deletions validator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ Running the tests of the compiled CLI requires
$ shelltest -c --diff --all shelltests/*.test
```

### Releasing

To release a new version of `otel_config_validator` the version in `dist.toml`
and the `Version` property of `cli.Comamnd` in `main.go` must be bumped. Next, a
tag prefixed with `validator-` must be created and pushed to the repository, for
example `validator-0.1.0`. Then, the `cargo-dist` Github Action will create a
Github release, build binaries for multiple platforms and publish them to the
new release.

Docker image are published on merge to `main`.
1 change: 1 addition & 0 deletions validator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func main() {
cmd := &cli.Command{
Name: "otel_config_validator",
Usage: "Validate a configuration file against the OpenTelemetry Configuration Schema",
Version: "0.1.0",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "output",
Expand Down

0 comments on commit cb25f5c

Please sign in to comment.