Skip to content

Commit

Permalink
Update convert_json_schema so that the file name is major.minor.json
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianrbz committed Dec 9, 2024
1 parent 2dd0fc6 commit 8f3081c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ For example, running:
```bash
./plugins convert_json_schema --version 3.9.x --plugins acme
```
converts `./schemas/acme/3.4.x.json` into a valid JSON schema and writes it to `./schemas/acme/3.5.x.json`.
converts `./schemas/acme/3.9.x.json` into a valid JSON schema and writes it to `./json_schemas/acme/3.9.json`.

## Updating the repo after a new release

Expand Down
2 changes: 1 addition & 1 deletion lib/convert_json_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run!

# Write the schema to the destination
FileUtils.mkdir_p("#{@options[:destination]}/#{plugin_name}")
dest = File.join(@options[:destination], plugin_name, "#{@options['version']}.json")
dest = File.join(@options[:destination], plugin_name, "#{@options['version'].gsub('.x', '')}.json")
File.write(dest, JSON.pretty_generate(json_schema.deep_sort))
end
end
Expand Down

0 comments on commit 8f3081c

Please sign in to comment.