File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 55 ".github" ,
66 ".openapi-generator-ignore" ,
77 "LICENSE" ,
8- "openapi"
8+ "openapi" ,
9+ "openapitools.json"
910] . freeze
1011
1112::Dir . each_child ( ::Dir . pwd ) do |source |
Original file line number Diff line number Diff line change 11require "yaml"
2- config = ::YAML . load ( File . read ( "openapi/config.yml" ) )
2+ config = ::YAML . load ( ::File . read ( "openapi/config.yml" ) )
3+ major , minor , patch = config [ "artifactVersion" ] . split ( "." )
4+
5+ case ARGV [ 0 ]
6+ when "major"
7+ major = major . succ
8+ minor = 0
9+ patch = 0
10+ when "minor"
11+ minor = minor . succ
12+ patch = 0
13+ when "patch"
14+ patch = patch . succ
15+ end
16+
17+ config [ "artifactVersion" ] = "#{ major } .#{ minor } .#{ patch } "
18+ ::File . open ( "openapi/config.yml" , 'w' ) { |file | ::YAML . dump ( config , file ) }
319puts config [ "artifactVersion" ]
You can’t perform that action at this time.
0 commit comments