21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/release_manager/cli/release_mod_cli.rb', line 21
def self.run
options = {}
OptionParser.new do |opts|
opts.program_name = 'release-mod'
opts.version = ReleaseManager::VERSION
opts.on_head("\nSummary: Bumps the module version to the next revision and \n updates the changelog.md file with the new\n version by reading the metadata.json file. This should\n be run inside a module directory. \n\n EOF\n )\n opts.on(\"-d\", \"--dry-run\", \"Do a dry run, without making changes\") do |c|\n options[:dry_run] = c\n end\n opts.on('-a', '--auto', 'Run this script without interaction') do |c|\n options[:auto] = c\n end\n opts.on('-m', '--module-path [MODULEPATH]', \"The path to the module, defaults to \#{Dir.getwd}\") do |c|\n options[:path] = c\n end\n opts.on('-b', '--no-bump', \"Do not bump the version in metadata.json\") do |c|\n options[:bump] = c\n end\n opts.on('-r', '--repo [REPO]', \"The repo to use, defaults to repo found in the metadata source\") do |c|\n options[:repo] = c\n end\n opts.on('--verbose', \"Extra logging\") do |c|\n options[:verbose] = c\n end\n opts.on('-r', '--remote-release', \"Perform a remote release (For CI systems)\") do |c|\n options[:remote] = true\n end\n end.parse!\n r = options[:remote] ?\n RemoteRelease.new(options[:path], options) : Release.new(options[:path], options)\n r.run\nend\n"
|