6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/release_manager/cli/release_mod_cli.rb', line 6
def self.run
options = {}
OptionParser.new do |opts|
opts.program_name = 'release-mod'
opts.version = ReleaseManager::VERSION
opts.on_head(<<-EOF
Summary: Bumps the module version to the next revision and
updates the changelog.md file with the new
version by reading the metadata.json file. This should
be run inside a module directory.
EOF
)
opts.on("-d", "--dry-run", "Do a dry run, without making changes") do |c|
options[:dry_run] = c
end
opts.on('-a', '--auto', 'Run this script without interaction') do |c|
options[:auto] = c
end
opts.on('-m', '--module-path [MODULEPATH]', "The path to the module, defaults to #{Dir.getwd}") do |c|
options[:path] = c
end
opts.on('-b', '--no-bump', "Do not bump the version in metadata.json") do |c|
options[:bump] = c
end
opts.on('-r', '--repo [REPO]', "The repo to use, defaults to repo found in the metadata source") do |c|
options[:repo] = c
end
opts.on('--verbose', "Extra logging") do |c|
options[:verbose] = c
end
end.parse!
r = Release.new(options[:path], options)
r.run
end
|