raketary 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -2
- data/Gemfile +0 -18
- data/Gemfile.lock +13 -12
- data/README.md +5 -5
- data/Rakefile +3 -21
- data/bin/raketary +5 -16
- data/lib/raketary.rb +6 -18
- data/lib/raketary/app.rb +19 -31
- data/lib/raketary/bump_cmd.rb +39 -48
- data/lib/raketary/cmd.rb +31 -43
- data/lib/raketary/errors.rb +6 -18
- data/lib/raketary/ghp_sync_cmd.rb +32 -44
- data/lib/raketary/github_pkg_cmd.rb +16 -28
- data/lib/raketary/irb_cmd.rb +14 -26
- data/lib/raketary/nokogiri_cmd.rb +18 -30
- data/lib/raketary/run_cmd.rb +17 -29
- data/lib/raketary/sub_cmd.rb +5 -17
- data/lib/raketary/version.rb +4 -16
- data/raketary.gemspec +14 -32
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0e9cee720593352639f0730260e1ced416f72c4f359d160790861cfcbebbdd5
|
4
|
+
data.tar.gz: 130dde3aa7ca111fe6b2c7cdb9dc7e84c32df24316636897bdb3e3912e949f31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a95bd2139952da7fe69a623f67e9a51d46f18fc283e27ac89c5346ba5965ddc0992d9e0295da79b267e914f2285ed37cec7f35655f8b2dee7ed06c89fb1f5ac7
|
7
|
+
data.tar.gz: 81a71a41cf9a0027a4e68c118400a15d7d743f5ec6ffaf0ab7bd413580b4a510014e88861f3fdb7de2bf4c81eba5990d6e1528da526d45b12bf842286682ff11
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,25 @@
|
|
1
1
|
# Changelog | Raketary
|
2
2
|
|
3
|
-
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
Format is based on [Keep a Changelog v1.0.0](https://keepachangelog.com/en/1.0.0),
|
6
|
+
and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [[Unreleased]](https://github.com/esotericpig/raketary/compare/v0.2.2...HEAD)
|
9
|
+
-
|
10
|
+
|
11
|
+
|
12
|
+
## [v0.2.2] - 2021-06-16
|
13
|
+
### Changed
|
14
|
+
- Formatted code with RuboCop.
|
15
|
+
- Updated Gems.
|
4
16
|
|
5
|
-
## [[Unreleased]](https://github.com/esotericpig/raketary/compare/v0.2.1...master)
|
6
17
|
|
7
18
|
## [v0.2.1] - 2020-03-04
|
8
19
|
### Fixed
|
9
20
|
- Added back `irb` gem to Gemspec
|
10
21
|
|
22
|
+
|
11
23
|
## [v0.2.0] - 2020-03-04
|
12
24
|
### Added
|
13
25
|
- Added `GHPSyncCmd` for syncing YARDoc to GitHub Pages
|
@@ -18,10 +30,12 @@ Format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
18
30
|
### Changed
|
19
31
|
- Renamed `App*` classes (`app_*.rb` files) to `*Cmd` (`*_cmd.rb`) since they extend `Cmd`, not `App`
|
20
32
|
|
33
|
+
|
21
34
|
## [v0.1.3] - 2020-03-02
|
22
35
|
### Changed
|
23
36
|
- Changed AppGitHubPkg logic to not check if username is nil (minor; not a bug)
|
24
37
|
|
38
|
+
|
25
39
|
## [v0.1.2] - 2020-03-01
|
26
40
|
### Added
|
27
41
|
- Added `github_pkg` sub command using AppGitHubPkg & Raketeer::GitHubPkgTask
|
@@ -34,10 +48,12 @@ Format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
34
48
|
- Fixed AppBump (`bump` sub command) to bump the bundle after bumping all
|
35
49
|
- Before this fix, it required you calling `bump` twice on the command line
|
36
50
|
|
51
|
+
|
37
52
|
## [v0.1.1] - 2019-12-18
|
38
53
|
### Changed
|
39
54
|
- Added more info to CHANGELOG, README, TODO
|
40
55
|
|
56
|
+
|
41
57
|
## [v0.1.0] - 2019-08-06
|
42
58
|
### Added
|
43
59
|
- .gitignore
|
data/Gemfile
CHANGED
@@ -1,24 +1,6 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
#--
|
5
|
-
# This file is part of Raketary.
|
6
|
-
# Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
|
7
|
-
#
|
8
|
-
# Raketary is free software: you can redistribute it and/or modify
|
9
|
-
# it under the terms of the GNU Lesser General Public License as published by
|
10
|
-
# the Free Software Foundation, either version 3 of the License, or
|
11
|
-
# (at your option) any later version.
|
12
|
-
#
|
13
|
-
# Raketary is distributed in the hope that it will be useful,
|
14
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
# GNU Lesser General Public License for more details.
|
17
|
-
#
|
18
|
-
# You should have received a copy of the GNU Lesser General Public License
|
19
|
-
# along with Raketary. If not, see <https://www.gnu.org/licenses/>.
|
20
|
-
#++
|
21
|
-
|
22
4
|
|
23
5
|
source 'https://rubygems.org'
|
24
6
|
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
raketary (0.2.
|
5
|
-
irb (~> 1.
|
4
|
+
raketary (0.2.2)
|
5
|
+
irb (~> 1.3)
|
6
6
|
rake (~> 13.0)
|
7
7
|
raketeer (~> 0.2)
|
8
8
|
yard_ghurt (~> 1.2)
|
@@ -10,25 +10,26 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
io-console (0.5.
|
14
|
-
irb (1.
|
15
|
-
reline (>= 0.
|
16
|
-
rake (13.0.
|
17
|
-
raketeer (0.2.
|
13
|
+
io-console (0.5.9)
|
14
|
+
irb (1.3.5)
|
15
|
+
reline (>= 0.1.5)
|
16
|
+
rake (13.0.3)
|
17
|
+
raketeer (0.2.11)
|
18
18
|
rake
|
19
|
-
reline (0.
|
19
|
+
reline (0.2.5)
|
20
20
|
io-console (~> 0.5)
|
21
|
-
yard (0.9.
|
22
|
-
yard_ghurt (1.2.
|
21
|
+
yard (0.9.26)
|
22
|
+
yard_ghurt (1.2.1)
|
23
23
|
rake
|
24
|
+
yard
|
24
25
|
|
25
26
|
PLATFORMS
|
26
27
|
ruby
|
27
28
|
|
28
29
|
DEPENDENCIES
|
29
|
-
bundler (~> 2.
|
30
|
+
bundler (~> 2.2)
|
30
31
|
raketary!
|
31
32
|
yard (~> 0.9)
|
32
33
|
|
33
34
|
BUNDLED WITH
|
34
|
-
2.
|
35
|
+
2.2.20
|
data/README.md
CHANGED
@@ -66,7 +66,7 @@ $ raketary bump
|
|
66
66
|
[bump] Options:
|
67
67
|
-n, --dry-run do a dry run (do NOT write to files)
|
68
68
|
-s, --strict enforce semantic versioning (i.e., \d+\.\d+\.\d+.*)
|
69
|
-
|
69
|
+
|
70
70
|
-v, --ver [STR] show/set the version (e.g.: '1.2.3-alpha.4+beta.5') (default: show)
|
71
71
|
-m, --major [INT,STR] bump/set the major number (e.g.: +2, 4) (default: +1)
|
72
72
|
-i, --minor [INT,STR] bump/set the minor number (e.g.: +2, 4) (default: +1)
|
@@ -74,7 +74,7 @@ $ raketary bump
|
|
74
74
|
-r, --pre [STR] set/erase the pre-release extension (e.g.: 'alpha.4') (default: erase)
|
75
75
|
-b, --build [STR] set/erase the the build metadata (e.g.: 'beta.5') (default: erase)
|
76
76
|
-u, --bundle bump the Gemfile.lock version
|
77
|
-
|
77
|
+
|
78
78
|
-h, --help show this help
|
79
79
|
-x, --example show some examples
|
80
80
|
```
|
@@ -123,10 +123,10 @@ $ raketary ghp_sync -h
|
|
123
123
|
...
|
124
124
|
[ghp_sync] Options:
|
125
125
|
-g, --ghp-dir STR the destination (GitHub Pages) directory to sync "doc/" to
|
126
|
-
|
126
|
+
|
127
127
|
-d, --deploy actually deploy (don't just do a dry-run)
|
128
128
|
-s, --sync-args STR additional args to pass to the sync command
|
129
|
-
|
129
|
+
|
130
130
|
-h, --help show this help
|
131
131
|
```
|
132
132
|
|
@@ -144,7 +144,7 @@ $ bundle exec rake -T
|
|
144
144
|
[GNU LGPL v3+](LICENSE.txt)
|
145
145
|
|
146
146
|
> Raketary (<https://github.com/esotericpig/raketary>)
|
147
|
-
> Copyright (c) 2019-
|
147
|
+
> Copyright (c) 2019-2021 Jonathan Bradley Whited
|
148
148
|
>
|
149
149
|
> Raketary is free software: you can redistribute it and/or modify
|
150
150
|
> it under the terms of the GNU Lesser General Public License as published by
|
data/Rakefile
CHANGED
@@ -1,24 +1,6 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
#--
|
5
|
-
# This file is part of Raketary.
|
6
|
-
# Copyright (c) 2019-2020 Jonathan Bradley Whited (@esotericpig)
|
7
|
-
#
|
8
|
-
# Raketary is free software: you can redistribute it and/or modify
|
9
|
-
# it under the terms of the GNU Lesser General Public License as published by
|
10
|
-
# the Free Software Foundation, either version 3 of the License, or
|
11
|
-
# (at your option) any later version.
|
12
|
-
#
|
13
|
-
# Raketary is distributed in the hope that it will be useful,
|
14
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
# GNU Lesser General Public License for more details.
|
17
|
-
#
|
18
|
-
# You should have received a copy of the GNU Lesser General Public License
|
19
|
-
# along with Raketary. If not, see <https://www.gnu.org/licenses/>.
|
20
|
-
#++
|
21
|
-
|
22
4
|
|
23
5
|
require 'bundler/gem_tasks'
|
24
6
|
|
@@ -34,12 +16,12 @@ CLEAN.exclude('.git/','stock/')
|
|
34
16
|
CLOBBER.include('doc/')
|
35
17
|
|
36
18
|
|
37
|
-
YARD::Rake::YardocTask.new
|
19
|
+
YARD::Rake::YardocTask.new do |task|
|
38
20
|
task.files = [File.join('lib','**','*.rb')]
|
39
|
-
|
21
|
+
|
40
22
|
task.options += ['--files','CHANGELOG.md,LICENSE.txt']
|
41
23
|
task.options += ['--readme','README.md']
|
42
|
-
|
24
|
+
|
43
25
|
task.options << '--protected' # Show protected methods
|
44
26
|
#task.options += ['--template-path',File.join('yard','templates')]
|
45
27
|
task.options += ['--title',"Raketary v#{Raketary::VERSION} Doc"]
|
data/bin/raketary
CHANGED
@@ -4,25 +4,14 @@
|
|
4
4
|
|
5
5
|
#--
|
6
6
|
# This file is part of Raketary.
|
7
|
-
# Copyright (c) 2019 Jonathan Bradley Whited
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# it under the terms of the GNU Lesser General Public License as published by
|
11
|
-
# the Free Software Foundation, either version 3 of the License, or
|
12
|
-
# (at your option) any later version.
|
13
|
-
#
|
14
|
-
# Raketary is distributed in the hope that it will be useful,
|
15
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
-
# GNU Lesser General Public License for more details.
|
18
|
-
#
|
19
|
-
# You should have received a copy of the GNU Lesser General Public License
|
20
|
-
# along with Raketary. If not, see <https://www.gnu.org/licenses/>.
|
7
|
+
# Copyright (c) 2019-2021 Jonathan Bradley Whited
|
8
|
+
#
|
9
|
+
# SPDX-License-Identifier: LGPL-3.0-or-later
|
21
10
|
#++
|
22
11
|
|
23
12
|
|
24
13
|
require 'raketary'
|
25
14
|
|
26
|
-
app = Raketary::App.new
|
15
|
+
app = Raketary::App.new
|
27
16
|
|
28
|
-
app.run
|
17
|
+
app.run
|
data/lib/raketary.rb
CHANGED
@@ -1,27 +1,15 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# encoding: UTF-8
|
3
2
|
# frozen_string_literal: true
|
4
3
|
|
5
4
|
#--
|
6
5
|
# This file is part of Raketary.
|
7
|
-
# Copyright (c) 2019-
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# it under the terms of the GNU Lesser General Public License as published by
|
11
|
-
# the Free Software Foundation, either version 3 of the License, or
|
12
|
-
# (at your option) any later version.
|
13
|
-
#
|
14
|
-
# Raketary is distributed in the hope that it will be useful,
|
15
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
-
# GNU Lesser General Public License for more details.
|
18
|
-
#
|
19
|
-
# You should have received a copy of the GNU Lesser General Public License
|
20
|
-
# along with Raketary. If not, see <https://www.gnu.org/licenses/>.
|
6
|
+
# Copyright (c) 2019-2021 Jonathan Bradley Whited
|
7
|
+
#
|
8
|
+
# SPDX-License-Identifier: LGPL-3.0-or-later
|
21
9
|
#++
|
22
10
|
|
23
11
|
|
24
|
-
TESTING_RAKETARY = ($
|
12
|
+
TESTING_RAKETARY = ($PROGRAM_NAME == __FILE__)
|
25
13
|
|
26
14
|
if TESTING_RAKETARY
|
27
15
|
require 'rubygems'
|
@@ -42,10 +30,10 @@ require 'raketary/version'
|
|
42
30
|
|
43
31
|
|
44
32
|
###
|
45
|
-
# @author Jonathan Bradley Whited
|
33
|
+
# @author Jonathan Bradley Whited
|
46
34
|
# @since 0.1.0
|
47
35
|
###
|
48
36
|
module Raketary
|
49
37
|
end
|
50
38
|
|
51
|
-
Raketary::App.new
|
39
|
+
Raketary::App.new.run if TESTING_RAKETARY
|
data/lib/raketary/app.rb
CHANGED
@@ -1,23 +1,11 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# encoding: UTF-8
|
3
2
|
# frozen_string_literal: true
|
4
3
|
|
5
4
|
#--
|
6
5
|
# This file is part of Raketary.
|
7
|
-
# Copyright (c) 2019-
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# it under the terms of the GNU Lesser General Public License as published by
|
11
|
-
# the Free Software Foundation, either version 3 of the License, or
|
12
|
-
# (at your option) any later version.
|
13
|
-
#
|
14
|
-
# Raketary is distributed in the hope that it will be useful,
|
15
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
-
# GNU Lesser General Public License for more details.
|
18
|
-
#
|
19
|
-
# You should have received a copy of the GNU Lesser General Public License
|
20
|
-
# along with Raketary. If not, see <https://www.gnu.org/licenses/>.
|
6
|
+
# Copyright (c) 2019-2021 Jonathan Bradley Whited
|
7
|
+
#
|
8
|
+
# SPDX-License-Identifier: LGPL-3.0-or-later
|
21
9
|
#++
|
22
10
|
|
23
11
|
|
@@ -34,7 +22,7 @@ require 'raketary/version'
|
|
34
22
|
|
35
23
|
module Raketary
|
36
24
|
###
|
37
|
-
# @author Jonathan Bradley Whited
|
25
|
+
# @author Jonathan Bradley Whited
|
38
26
|
# @since 0.1.0
|
39
27
|
###
|
40
28
|
class App < Cmd
|
@@ -44,44 +32,44 @@ module Raketary
|
|
44
32
|
attr_accessor :ran_cmd
|
45
33
|
attr_accessor :soft_error
|
46
34
|
attr_reader :version
|
47
|
-
|
35
|
+
|
48
36
|
alias_method :ran_cmd?,:ran_cmd
|
49
|
-
|
37
|
+
|
50
38
|
def initialize(args=ARGV)
|
51
39
|
super(self,'raketary')
|
52
|
-
|
40
|
+
|
53
41
|
@args = args
|
54
42
|
@options = {}
|
55
43
|
@parsers = []
|
56
44
|
@ran_cmd = false
|
57
45
|
@soft_error = nil
|
58
46
|
@version = Raketary::VERSION
|
59
|
-
|
47
|
+
|
60
48
|
@sub_cmds = {
|
61
|
-
'bump' => SubCmd.new(
|
49
|
+
'bump' => SubCmd.new("Bump your project's version",BumpCmd),
|
62
50
|
'ghp_sync' => SubCmd.new('Sync YARDoc to GitHub Pages repo',GHPSyncCmd),
|
63
|
-
'github_pkg' => SubCmd.new(
|
51
|
+
'github_pkg' => SubCmd.new("Publish your project's gem(s) to GitHub Packages",GitHubPkgCmd),
|
64
52
|
'irb' => SubCmd.new('Open an irb session loaded with your library',IRBCmd),
|
65
53
|
'nokogiri' => SubCmd.new('Install Nokogiri libs',NokogiriCmd),
|
66
|
-
'run' => SubCmd.new(
|
54
|
+
'run' => SubCmd.new("Run your project's main file: #{@name} run -- --version",RunCmd)
|
67
55
|
}
|
68
|
-
|
56
|
+
|
69
57
|
parse!(true) do |op|
|
70
58
|
op.banner = "Usage: #{@name} [options] [command] [options]..."
|
71
|
-
|
59
|
+
|
72
60
|
op.on_tail('-v','--version',"show the version of #{@name}") do
|
73
61
|
puts "#{@name} v#{@version}"
|
74
62
|
exit
|
75
63
|
end
|
76
64
|
end
|
77
65
|
end
|
78
|
-
|
79
|
-
def run
|
66
|
+
|
67
|
+
def run
|
80
68
|
return if @ran_cmd
|
81
|
-
|
82
|
-
puts @parsers.join
|
83
|
-
|
84
|
-
if !@soft_error.nil?
|
69
|
+
|
70
|
+
puts @parsers.join
|
71
|
+
|
72
|
+
if !@soft_error.nil?
|
85
73
|
puts
|
86
74
|
puts "ERROR: #{@soft_error}"
|
87
75
|
end
|
data/lib/raketary/bump_cmd.rb
CHANGED
@@ -1,23 +1,11 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# encoding: UTF-8
|
3
2
|
# frozen_string_literal: true
|
4
3
|
|
5
4
|
#--
|
6
5
|
# This file is part of Raketary.
|
7
|
-
# Copyright (c) 2019-
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# it under the terms of the GNU Lesser General Public License as published by
|
11
|
-
# the Free Software Foundation, either version 3 of the License, or
|
12
|
-
# (at your option) any later version.
|
13
|
-
#
|
14
|
-
# Raketary is distributed in the hope that it will be useful,
|
15
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
-
# GNU Lesser General Public License for more details.
|
18
|
-
#
|
19
|
-
# You should have received a copy of the GNU Lesser General Public License
|
20
|
-
# along with Raketary. If not, see <https://www.gnu.org/licenses/>.
|
6
|
+
# Copyright (c) 2019-2021 Jonathan Bradley Whited
|
7
|
+
#
|
8
|
+
# SPDX-License-Identifier: LGPL-3.0-or-later
|
21
9
|
#++
|
22
10
|
|
23
11
|
|
@@ -27,63 +15,66 @@ require 'raketeer/bump_task'
|
|
27
15
|
|
28
16
|
module Raketary
|
29
17
|
###
|
30
|
-
# @author Jonathan Bradley Whited
|
18
|
+
# @author Jonathan Bradley Whited
|
31
19
|
# @since 0.1.0
|
32
20
|
###
|
33
21
|
class BumpCmd < Cmd
|
34
22
|
def initialize(*)
|
35
23
|
super
|
36
|
-
|
24
|
+
|
37
25
|
@run_cmd = false
|
38
|
-
|
39
|
-
parse!
|
26
|
+
|
27
|
+
parse! do |op|
|
40
28
|
op.on('-n','--dry-run','do a dry run (do NOT write to files)')
|
41
29
|
op.on('-s','--strict','enforce semantic versioning (i.e., \\d+\\.\\d+\\.\\d+.*)')
|
42
|
-
|
30
|
+
|
43
31
|
op.separator op.summary_indent
|
44
|
-
|
45
|
-
op.on('-v','--ver [STR]'
|
32
|
+
|
33
|
+
op.on('-v','--ver [STR]',"show/set the version (e.g.: '1.2.3-alpha.4+beta.5')" \
|
34
|
+
' (default: show)') do |ver|
|
46
35
|
@run_cmd = true
|
47
36
|
ver
|
48
37
|
end
|
49
|
-
op.on('-m','--major [INT,STR]'
|
38
|
+
op.on('-m','--major [INT,STR]','bump/set the major number (e.g.: +2, 4) (default: +1)') do |major|
|
50
39
|
@run_cmd = true
|
51
|
-
major.nil?
|
40
|
+
major.nil? ? '+1' : major
|
52
41
|
end
|
53
|
-
op.on('-i','--minor [INT,STR]'
|
42
|
+
op.on('-i','--minor [INT,STR]','bump/set the minor number (e.g.: +2, 4) (default: +1)') do |minor|
|
54
43
|
@run_cmd = true
|
55
|
-
minor.nil?
|
44
|
+
minor.nil? ? '+1' : minor
|
56
45
|
end
|
57
|
-
op.on('-p','--patch [INT,STR]'
|
46
|
+
op.on('-p','--patch [INT,STR]','bump/set the patch number (e.g.: +2, 4) (default: +1)') do |patch|
|
58
47
|
@run_cmd = true
|
59
|
-
patch.nil?
|
48
|
+
patch.nil? ? '+1' : patch
|
60
49
|
end
|
61
|
-
op.on('-r','--pre [STR]'
|
50
|
+
op.on('-r','--pre [STR]',"set/erase the pre-release extension (e.g.: 'alpha.4')" \
|
51
|
+
' (default: erase)') do |pre|
|
62
52
|
@run_cmd = true
|
63
|
-
pre.nil?
|
53
|
+
pre.nil? ? '' : pre
|
64
54
|
end
|
65
|
-
op.on('-b','--build [STR]'
|
55
|
+
op.on('-b','--build [STR]',"set/erase the the build metadata (e.g.: 'beta.5')" \
|
56
|
+
' (default: erase)') do |build|
|
66
57
|
@run_cmd = true
|
67
|
-
build.nil?
|
58
|
+
build.nil? ? '' : build
|
68
59
|
end
|
69
60
|
op.on('-u','--bundle','bump the Gemfile.lock version') do
|
70
61
|
@run_cmd = true
|
71
62
|
true
|
72
63
|
end
|
73
|
-
|
64
|
+
|
74
65
|
op.separator op.summary_indent
|
75
|
-
|
66
|
+
|
76
67
|
op.on_tail('-x','--example','show some examples') do
|
77
|
-
puts <<~
|
68
|
+
puts <<~EXAMPLES
|
78
69
|
#{app.name} #{@name} -v # Show the current version
|
79
70
|
#{app.name} #{@name} -n # Do a dry run for any task (will NOT write to files)
|
80
|
-
|
71
|
+
|
81
72
|
#{app.name} #{@name} -v '1.2.3-alpha.4-beta.5' # Set the version manually
|
82
73
|
#{app.name} #{@name} -m 1 -i 2 -p 3 # Set the version numbers
|
83
74
|
#{app.name} #{@name} -r 'alpha.4' -b 'beta.5' # Set the version extensions
|
84
75
|
#{app.name} #{@name} -m -i -p # Bump the version numbers by 1
|
85
76
|
#{app.name} #{@name} -m +2 -i +3 -p +4 # Bump the version numbers by X
|
86
|
-
|
77
|
+
|
87
78
|
#{app.name} #{@name} -m # Bump the major number by 1
|
88
79
|
#{app.name} #{@name} -m 1 # Set the major number to 1
|
89
80
|
#{app.name} #{@name} -m +2 # Bump the major number by 2
|
@@ -98,24 +89,24 @@ module Raketary
|
|
98
89
|
#{app.name} #{@name} -b # Erase the build metadata
|
99
90
|
#{app.name} #{@name} -b 'beta.5' # Set the build metadata
|
100
91
|
#{app.name} #{@name} -u # Bump the Gemfile.lock version
|
101
|
-
|
92
|
+
EXAMPLES
|
102
93
|
exit
|
103
94
|
end
|
104
95
|
end
|
105
96
|
end
|
106
|
-
|
107
|
-
def run
|
97
|
+
|
98
|
+
def run
|
108
99
|
super()
|
109
100
|
return unless @run_cmd
|
110
|
-
|
111
|
-
bump_task = Raketeer::BumpTask.new
|
101
|
+
|
102
|
+
bump_task = Raketeer::BumpTask.new do |task|
|
112
103
|
task.bump_bundle = false
|
113
104
|
task.dry_run = app.options[:dry_run] ? true : false
|
114
105
|
task.strict = app.options[:strict] ? true : false
|
115
106
|
end
|
116
|
-
|
117
|
-
bump_task.check_env
|
118
|
-
|
107
|
+
|
108
|
+
bump_task.check_env
|
109
|
+
|
119
110
|
bump_task.bump_all(Raketeer::BumpVer.new(
|
120
111
|
version: app.options[:ver],
|
121
112
|
major: app.options[:major],
|
@@ -124,9 +115,9 @@ module Raketary
|
|
124
115
|
prerelease: app.options[:pre],
|
125
116
|
build_meta: app.options[:build]
|
126
117
|
))
|
127
|
-
|
128
|
-
bump_task.bump_bundle_file
|
129
|
-
|
118
|
+
|
119
|
+
bump_task.bump_bundle_file if app.options[:bundle]
|
120
|
+
|
130
121
|
app.ran_cmd = true
|
131
122
|
end
|
132
123
|
end
|