devops_assist 0.3.9 → 0.3.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9bb15c3e0a551f56d09d20da1e5a3ae5ca617a9886b5c75fbb882063e0e9e4d
4
- data.tar.gz: fde7a2ee5487e9e3a1888474902951b0476000cc255c37fbaa9bff2c0c0e15b7
3
+ metadata.gz: baa4f3b3891cdbf45d1c4e2b95c3d515c9e6c0fa72ce01d66c2201b841638c75
4
+ data.tar.gz: 1d5279835de5d13f743d6c659d7d19dcce7ae3e3bafb0f8125be8cf128c21be1
5
5
  SHA512:
6
- metadata.gz: 4741f1ae4fd772f5bed1c35e2bc4e60c8e7e7f17937a8302e14b2638e6c7c57c6499e3bff8215665befb732ed0df4eb82e5678ab703db624e19a7b027c051746
7
- data.tar.gz: a68e0ce4b74520eabc5e418e575237251a923719e5c712dc617f8225d3ba7c9c2e7ba0f8d013e1b461a343b14650937738f202f3487520d73b96f91ae7897799
6
+ metadata.gz: 551d286841c46209940a868c645cdc5d403bccca54312a2349f16b42f97572e88c6bb6d73b6c15e13dee5af188a6c99af4983d2db90cd5108828372639477bcc
7
+ data.tar.gz: 882ef893631d5333a4c304f699d60233584699696e0507564829b9139ad09761bf3344976237a97e31d6fa466a23659db6c03d09e27e82290c73f3c03366f44d
data/.release_history.yml CHANGED
@@ -34,3 +34,5 @@ devops_assist:
34
34
  :timestamp: 1679896577.1906195
35
35
  - :version: 0.3.8
36
36
  :timestamp: 1679896754.9692261
37
+ - :version: 0.3.9
38
+ :timestamp: 1679897047.3892941
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devops_assist (0.3.9)
4
+ devops_assist (0.3.11)
5
5
  git_cli
6
- git_cli_prompt
6
+ git_cli_prompt (~> 0.3.3)
7
7
  gvcs
8
8
  teLogger
9
9
  toolrack
@@ -19,7 +19,7 @@ GEM
19
19
  ptools (~> 1.4.0)
20
20
  teLogger
21
21
  toolrack
22
- git_cli_prompt (0.3.2)
22
+ git_cli_prompt (0.3.3)
23
23
  teLogger
24
24
  toolrack
25
25
  tty-prompt
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
 
37
37
  spec.add_dependency 'gvcs'
38
38
  spec.add_dependency 'git_cli'
39
- spec.add_dependency 'git_cli_prompt'
39
+ spec.add_dependency 'git_cli_prompt', "~> 0.3.3"
40
40
 
41
41
  # Uncomment to register a new dependency of your gem
42
42
  # spec.add_dependency "example-gem", "~> 1.0"
@@ -106,7 +106,8 @@ module DevopsAssist
106
106
  cmd = "cd #{root} && gem push #{targetGem} -k #{selAcct}"
107
107
  logger.tdebug :pubgemfile, "Command to publish gem : #{cmd}"
108
108
  res = `#{cmd}`
109
- $stdin.gets while $stdin.ready? # to clear out any remaining input entry in the event publish operation failed
109
+ #$stdin.gets while $stdin.ready? # to clear out any remaining input entry in the event publish operation failed
110
+ $stdin.iflush
110
111
  [$?, res, targetGem]
111
112
  else
112
113
  raise GemError, "Given Gemfile '#{gemfile}' not found"
@@ -1,5 +1,5 @@
1
1
 
2
2
 
3
3
  module DevopsAssist
4
- VERSION = "0.3.9"
4
+ VERSION = "0.3.11"
5
5
  end
@@ -37,6 +37,9 @@ namespace :devops do
37
37
  gu = GemUtils.new(root)
38
38
  begin
39
39
 
40
+ ws = Gvcs::Workspace.new(root)
41
+ raise DevopsAssist::Error, "Given path '#{root}' is not a git workspace" if not ws.is_workspace?
42
+
40
43
  pmt = TTY::Prompt.new
41
44
 
42
45
  # let's mark the session to allow automated context switching
@@ -67,7 +70,7 @@ namespace :devops do
67
70
  miscFiles << selVerFile # version.rb
68
71
  miscFiles << DevopsAssist::ReleaseLogger::LOG_NAME # release_history.yml
69
72
  #miscFiles << 'Gemfile.lock'
70
- Rake::Task["devops:vcs:checkin_misc_files"].execute({ root: root, files: miscFiles, version: ver })
73
+ Rake::Task["devops:vcs:checkin_misc_files"].execute({ root: root, files: miscFiles, version: ver, workspace: ws, pmt: pmt })
71
74
  #pmt.say " Updated files during release prep have committed into version control", color: :yellow
72
75
 
73
76
 
@@ -80,49 +83,52 @@ namespace :devops do
80
83
  pmt.say " Workspace check in done\n\n", color: :yellow
81
84
 
82
85
  proceed = pmt.yes?(" Proceed to build the gem? ", color: :yellow)
83
- raise GitCliPrompt::UserAborted if not proceed
84
-
85
-
86
- # test build the gem, make sure there is no error
87
- # If error expected the scripts stops here
88
- Rake::Task["build"].execute
89
-
90
- # Record the version number in the log files
91
- # for reporting traceability
92
- rl = DevopsAssist::ReleaseLogger.load
93
- rl.log_release(gemName, ver)
94
- #pmt.say " Release version number is logged after successful test built", color: :yellow
95
-
96
- ## If successfully built, following files shall be changed
97
- #miscFiles = []
98
- #miscFiles << selVerFile # version.rb
99
- #miscFiles << DevopsAssist::ReleaseLogger::LOG_NAME # release_history.yml
100
- #miscFiles << 'Gemfile.lock'
101
- #Rake::Task["devops:vcs:checkin_misc_files"].execute({ root: root, files: miscFiles, version: ver })
102
- #pmt.say " Updated files during release prep have committed into version control", color: :yellow
103
-
104
- ## check in source code
105
- #res = Rake::Task["devops:vcs:checkin_changes"].execute
106
- #pmt.say " Workspace check in done\n", color: :yellow
107
-
108
- #proceed = pmt.yes?(" Proceed with release? ")
109
86
  #raise GitCliPrompt::UserAborted if not proceed
110
87
 
111
- #
112
- # Actual building the real gems build the gem
113
- # Any possible reasons here error but not the one above?
114
- #
115
- # Main reason to do double build is to avoid to generate
116
- # 2 log entries in Git for each build, which the 2nd (latest)
117
- # log is just about the version updates (version pre 0.4.x way)
118
- #
119
- #Rake::Task["build"].execute
120
-
121
- #rl.log_release(gemName, ver)
122
- #pmt.say " Release version number is logged", color: :yellow
88
+ if proceed
89
+
90
+ # test build the gem, make sure there is no error
91
+ # If error expected the scripts stops here
92
+ Rake::Task["build"].execute
93
+
94
+ # Record the version number in the log files
95
+ # for reporting traceability
96
+ rl = DevopsAssist::ReleaseLogger.load
97
+ rl.log_release(gemName, ver)
98
+ #pmt.say " Release version number is logged after successful test built", color: :yellow
99
+
100
+ ## If successfully built, following files shall be changed
101
+ #miscFiles = []
102
+ #miscFiles << selVerFile # version.rb
103
+ #miscFiles << DevopsAssist::ReleaseLogger::LOG_NAME # release_history.yml
104
+ #miscFiles << 'Gemfile.lock'
105
+ #Rake::Task["devops:vcs:checkin_misc_files"].execute({ root: root, files: miscFiles, version: ver })
106
+ #pmt.say " Updated files during release prep have committed into version control", color: :yellow
107
+
108
+ ## check in source code
109
+ #res = Rake::Task["devops:vcs:checkin_changes"].execute
110
+ #pmt.say " Workspace check in done\n", color: :yellow
111
+
112
+ #proceed = pmt.yes?(" Proceed with release? ")
113
+ #raise GitCliPrompt::UserAborted if not proceed
114
+
115
+ #
116
+ # Actual building the real gems build the gem
117
+ # Any possible reasons here error but not the one above?
118
+ #
119
+ # Main reason to do double build is to avoid to generate
120
+ # 2 log entries in Git for each build, which the 2nd (latest)
121
+ # log is just about the version updates (version pre 0.4.x way)
122
+ #
123
+ #Rake::Task["build"].execute
124
+
125
+ #rl.log_release(gemName, ver)
126
+ #pmt.say " Release version number is logged", color: :yellow
127
+
128
+ # publish gem
129
+ Rake::Task["devops:gem:publish_gem"].execute({ version: ver, pmt: pmt })
123
130
 
124
- # publish gem
125
- Rake::Task["devops:gem:publish_gem"].execute({ version: ver, pmt: pmt })
131
+ end
126
132
 
127
133
  # following files shall change when gem is built
128
134
  #miscFiles = []
@@ -132,7 +138,7 @@ namespace :devops do
132
138
  #Rake::Task["devops:vcs:checkin_misc_files"].execute({ root: root, files: miscFiles, version: ver })
133
139
  #pmt.say " Updated files during release prep have committed into version control", color: :yellow
134
140
 
135
- Rake::Task["devops:vcs:tag_source_code"].execute({ root: root, version: ver })
141
+ Rake::Task["devops:vcs:tag_source_code"].execute({ root: root, version: ver, workspace: ws, pmt: pmt })
136
142
  pmt.say " Source code is tagged as version #{ver}", color: :yellow
137
143
 
138
144
  Rake::Task["devops:vcs:push_source_code"].execute({ root: root, pmt: pmt })
data/tasks/vcs.rake CHANGED
@@ -21,13 +21,19 @@ namespace :devops do
21
21
  root = args[:root]
22
22
  files = args[:files]
23
23
  ver = args[:version]
24
+ ws = args[:workspace]
25
+ pmt = args[:pmt]
24
26
 
25
- ws = Gvcs::Workspace.new(root)
26
- if ws.is_workspace?
27
+ begin
28
+ #ws = Gvcs::Workspace.new(root)
29
+ #if ws.is_workspace?
27
30
  ws.add_to_staging(files)
28
31
  ws.commit(" Committing file changed during release version '#{ver}'")
29
- else
30
- raise DevopsAssist::Error, " Given path '#{root}' is not a repository"
32
+ #else
33
+ # raise DevopsAssist::Error, " Given path '#{root}' is not a repository"
34
+ #end
35
+ rescue Exception => ex
36
+ pmt.say "\n Error during checking in misc files. Error waas : #{ex.message}", color: :red
31
37
  end
32
38
 
33
39
  end
@@ -37,14 +43,14 @@ namespace :devops do
37
43
 
38
44
  root = args[:root]
39
45
  ver = args[:version]
46
+ ws = args[:workspace]
47
+ pmt = args[:pmt]
40
48
 
41
- pmt = TTY::Prompt.new
42
- msg = pmt.ask(" Tagging message : ", default: "Automated tagging of source code release version #{ver} by DevOps Assist")
43
- ws = Gvcs::Workspace.new(root)
44
- if ws.is_workspace?
49
+ begin
50
+ msg = pmt.ask(" Tagging message : ", default: "Automated tagging of source code release version #{ver} by DevOps Assist")
45
51
  ws.create_tag(ver, msg)
46
- else
47
- raise DevopsAssist::Error, "Given path '#{root}' is not a repository"
52
+ rescue Exception => ex
53
+ pmt.say "\n Error while tagging source code. Error was : #{ex.message}"
48
54
  end
49
55
 
50
56
  end
@@ -55,12 +61,16 @@ namespace :devops do
55
61
  root = args[:root]
56
62
  pmt = args[:pmt]
57
63
 
58
- cli = DevopsAssist::Vcs::Git::CliPrompt.new
59
- cli.push(root) do |ops, val|
60
- case ops
61
- when :push_info
62
- pmt.say " Source code push to remote repository '#{val[:name]}'", color: :yellow
64
+ begin
65
+ cli = DevopsAssist::Vcs::Git::CliPrompt.new
66
+ cli.push(root) do |ops, val|
67
+ case ops
68
+ when :push_info
69
+ pmt.say " Source code push to remote repository '#{val[:name]}'", color: :yellow
70
+ end
63
71
  end
72
+ rescue Exception => ex
73
+ pmt.say "\n Error while pushing source code. Error was : #{ex.message}", color: :red
64
74
  end
65
75
 
66
76
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devops_assist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Liaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-27 00:00:00.000000000 Z
11
+ date: 2023-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toolrack
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: git_cli_prompt
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 0.3.3
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 0.3.3
97
97
  description: ''
98
98
  email:
99
99
  - chrisliaw@antrapol.com
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
- rubygems_version: 3.4.6
142
+ rubygems_version: 3.4.10
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: ''