release-gem 0.1.22 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +8 -10
- data/lib/release/gem/gem_action.rb +3 -3
- data/lib/release/gem/vcs_action.rb +2 -18
- data/lib/release/gem/vcs_cli_action.rb +1 -1
- data/lib/release/gem/version.rb +1 -1
- data/templates/standard_cli_flow.rb +22 -7
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84f42d97fbc8fff6f263e782576d772d581b3b2ce2d3bed06e73a6b8c3ab328d
|
4
|
+
data.tar.gz: 25ac79dd9038c5ac19975bd22fe651add1f8304464cab77370493374cb93601c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c6b3f34b02a1f89275215a3f518966f67eaf03083fd0f83c67d8118551f2cc8af2a9520f258adb8d736d96c954f1d05bb23ad6dd81289641f6a3650fa08fabf
|
7
|
+
data.tar.gz: 7c0895ab232d4f6f316f242c80de190ced0f00ae9400f5c44150963e39ae99021c8724341cbeea89e81ca1632aaaa998b715d13d0ed490a95df2abc491da4a84
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
release-gem (0.1.
|
4
|
+
release-gem (0.1.29)
|
5
5
|
colorize
|
6
6
|
git_cli
|
7
|
-
gvcs
|
8
7
|
teLogger
|
9
8
|
toolrack
|
10
9
|
tty-command
|
@@ -13,13 +12,12 @@ PATH
|
|
13
12
|
GEM
|
14
13
|
remote: https://rubygems.org/
|
15
14
|
specs:
|
16
|
-
colorize (
|
15
|
+
colorize (1.1.0)
|
17
16
|
diff-lcs (1.5.0)
|
18
|
-
git_cli (0.
|
17
|
+
git_cli (0.13.2)
|
19
18
|
ptools (~> 1.4.0)
|
20
19
|
teLogger
|
21
20
|
toolrack
|
22
|
-
gvcs (0.1.2)
|
23
21
|
pastel (0.8.0)
|
24
22
|
tty-color (~> 0.5)
|
25
23
|
ptools (1.4.3)
|
@@ -28,17 +26,17 @@ GEM
|
|
28
26
|
rspec-core (~> 3.12.0)
|
29
27
|
rspec-expectations (~> 3.12.0)
|
30
28
|
rspec-mocks (~> 3.12.0)
|
31
|
-
rspec-core (3.12.
|
29
|
+
rspec-core (3.12.2)
|
32
30
|
rspec-support (~> 3.12.0)
|
33
|
-
rspec-expectations (3.12.
|
31
|
+
rspec-expectations (3.12.3)
|
34
32
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
33
|
rspec-support (~> 3.12.0)
|
36
|
-
rspec-mocks (3.12.
|
34
|
+
rspec-mocks (3.12.6)
|
37
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
36
|
rspec-support (~> 3.12.0)
|
39
|
-
rspec-support (3.12.
|
37
|
+
rspec-support (3.12.1)
|
40
38
|
teLogger (0.2.2)
|
41
|
-
toolrack (0.
|
39
|
+
toolrack (0.23.2)
|
42
40
|
tty-color (0.6.0)
|
43
41
|
tty-command (0.10.1)
|
44
42
|
pastel (~> 0.8)
|
@@ -362,15 +362,15 @@ module Release
|
|
362
362
|
credFile = File.join(Dir.home,".local","share","gem","credentials")
|
363
363
|
end
|
364
364
|
|
365
|
-
raise GemActionError, "Credential file not found at '#{credFile}'" if not File.exist?(credFile)
|
365
|
+
raise GemActionError, "Credential file not found at '#{credFile}'. Please at least perform an 'gem push' at command line to setup the credential file." if not File.exist?(credFile)
|
366
366
|
|
367
367
|
cred = nil
|
368
368
|
File.open(credFile,"r") do |f|
|
369
369
|
cred = YAML.load(f.read)
|
370
370
|
end
|
371
371
|
|
372
|
-
raise GemActionError, "Credential file is empty" if is_empty?(cred)
|
373
|
-
raise GemActionError, "No credential created yet for rubygems." if is_empty?(cred.keys)
|
372
|
+
raise GemActionError, "Credential file is empty. Please at least perform an 'gem push' at command line to setup the credential file." if is_empty?(cred)
|
373
|
+
raise GemActionError, "No credential created yet for rubygems. Please at least perform an 'gem push' at command line to setup the credential file." if is_empty?(cred.keys)
|
374
374
|
|
375
375
|
cred
|
376
376
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
|
2
|
-
require 'gvcs'
|
3
2
|
require 'git_cli'
|
4
3
|
|
5
4
|
module Release
|
@@ -15,29 +14,14 @@ module Release
|
|
15
14
|
|
16
15
|
def initialize(root, opts = { })
|
17
16
|
raise VcsActionError, "root cannot be null" if is_empty?(root)
|
18
|
-
@ws =
|
17
|
+
@ws = GitCli::Workspace.new(root)
|
19
18
|
|
20
19
|
oopts = opts || {}
|
21
20
|
@ui = oopts[:ui]
|
22
21
|
@engine = oopts[:engine]
|
23
|
-
|
24
|
-
|
25
|
-
#@gitDir = File.join(path.strip,".git")
|
26
|
-
#p @gitDir
|
27
|
-
#@gitBack = File.join(path.strip,".git_bak")
|
28
|
-
#p @gitBack
|
22
|
+
path = @ws.workspace_root
|
29
23
|
end
|
30
24
|
|
31
|
-
#def enable_dev_mode
|
32
|
-
# FileUtils.cp_r(@gitDir,@gitBack, remove_destination: true)
|
33
|
-
#end
|
34
|
-
|
35
|
-
#def dev_mode_end
|
36
|
-
# if File.exist?(@gitBack)
|
37
|
-
# FileUtils.mv(@gitBack, @gitDir)
|
38
|
-
# end
|
39
|
-
#end
|
40
|
-
|
41
25
|
def exec(&block)
|
42
26
|
instance_eval(&block) if block
|
43
27
|
end
|
@@ -544,7 +544,7 @@ module Release
|
|
544
544
|
val = args.first
|
545
545
|
sel = @prmt.select(pmsg("\n Please select one of the remote config below : ")) do |m|
|
546
546
|
val.each do |k,v|
|
547
|
-
m.choice k, k
|
547
|
+
m.choice "#{k} [#{v["push"]}]", k
|
548
548
|
end
|
549
549
|
m.choice "Skip pushing source code", :skip
|
550
550
|
m.choice "Abort", :abort
|
data/lib/release/gem/version.rb
CHANGED
@@ -27,18 +27,33 @@ Release::Gem.engine(:gem, root: Dir.getwd) do
|
|
27
27
|
|
28
28
|
if st
|
29
29
|
# step 4, push the gem to rubygems
|
30
|
-
|
31
|
-
|
30
|
+
# rescue here because if it failed, still should proceed
|
31
|
+
begin
|
32
|
+
gem_cli_push(version: ver)
|
33
|
+
rescue Exception => ex
|
34
|
+
STDERR.puts "\n -- Failed pushing Gem. Error was : #{ex.message}".red
|
35
|
+
end
|
36
|
+
|
37
|
+
# rescue here because if it failed, still should proceed
|
38
|
+
begin
|
39
|
+
gem_cli_install(version: ver)
|
40
|
+
rescue Exception => ex
|
41
|
+
STDERR.puts "\n -- Failed install the Gem onto local system. Error was : #{ex.message}".red
|
42
|
+
end
|
32
43
|
end
|
33
44
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
45
|
+
# This is another block of work that can resume even failed
|
46
|
+
begin
|
47
|
+
vcs_add_to_staging_if_commit_before("Gemfile.lock")
|
48
|
+
vcs_add_to_staging(value(:version_file_path))
|
49
|
+
vcs_commit("Commit after gem version #{ver} built")
|
50
|
+
rescue Exception => ex
|
51
|
+
STDERR.puts "\n -- Failed to perform post commit after gem built. Error was : #{ex.message}".red
|
52
|
+
end
|
38
53
|
|
54
|
+
# If tagging error no need to push
|
39
55
|
# step 7 : tag the source code
|
40
56
|
vcs_cli_tag( tag: ver )
|
41
|
-
|
42
57
|
# step 8 : Push the source code
|
43
58
|
vcs_cli_push
|
44
59
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: release-gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toolrack
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: gvcs
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: git_cli
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
140
|
- !ruby/object:Gem::Version
|
155
141
|
version: '0'
|
156
142
|
requirements: []
|
157
|
-
rubygems_version: 3.4.
|
143
|
+
rubygems_version: 3.4.6
|
158
144
|
signing_key:
|
159
145
|
specification_version: 4
|
160
146
|
summary: ''
|