devops_assist 0.3.4 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b5575312117dafd5eca9cae17c2671652bd9ed3bfd1a82441a972267aa6da04
4
- data.tar.gz: c54728232443d37e0de8b723bb92c63463fb873353501efdfb89965ecd84f997
3
+ metadata.gz: d4333f8e311a05e478f0720775350f05e557014a7e64ac1c8176d9a2742a1d5e
4
+ data.tar.gz: 1333d87b97be084a3213810f51fea601389c9b0d56f5eb4a6f9c1e016f68be74
5
5
  SHA512:
6
- metadata.gz: 8a2cb7d4992b9faa39f34e905b8d3ac077d70147553f9f54c3e4917e49cfd58048d3a5f3a137a6560a626204cd318c66950ee40643a5ca56ca72e674892ede04
7
- data.tar.gz: 833da63cc73361babc7a0dcbe1374d46a7d55d0fc08cb957f53b45420f39e7c2e6b63eb07fea7f53afeabb3461aa9d49a1f6ddf1e81cf6e22fb01c300b197d89
6
+ metadata.gz: 02f42dac3f70baabb42f623ffb46c6d06c3facb9837c183bb0709c3f4cb6989d334a431f65971151980cdc36c81c269a04023afc009e0f2f734032cf7b6f416e
7
+ data.tar.gz: 04cc0bfb01201d31a3fa936fc660d17e4cb494ce40ce30d1ac3e2c09bcc939af24c0ef85e267ceda4c3bafe313b4634a1375ee14b625dd0f5bbeae383fab5286
data/.release_history.yml CHANGED
@@ -24,3 +24,7 @@ devops_assist:
24
24
  :timestamp: 1679814741.9125335
25
25
  - :version: 0.3.4
26
26
  :timestamp: 1679814912.2051551
27
+ - :version: 0.3.4
28
+ :timestamp: 1679814952.708086
29
+ - :version: 0.3.5
30
+ :timestamp: 1679817289.8002794
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devops_assist (0.3.1)
4
+ devops_assist (0.3.6)
5
5
  git_cli
6
6
  git_cli_prompt
7
7
  gvcs
@@ -14,35 +14,35 @@ GEM
14
14
  specs:
15
15
  base58 (0.2.3)
16
16
  diff-lcs (1.5.0)
17
- git_cli (0.10.0)
17
+ git_cli (0.11.2)
18
18
  gvcs
19
19
  ptools (~> 1.4.0)
20
20
  teLogger
21
21
  toolrack
22
- git_cli_prompt (0.3.1)
22
+ git_cli_prompt (0.3.2)
23
23
  teLogger
24
24
  toolrack
25
25
  tty-prompt
26
- gvcs (0.1.0)
26
+ gvcs (0.1.1)
27
27
  pastel (0.8.0)
28
28
  tty-color (~> 0.5)
29
- ptools (1.4.2)
29
+ ptools (1.4.3)
30
30
  rake (13.0.6)
31
- rspec (3.11.0)
32
- rspec-core (~> 3.11.0)
33
- rspec-expectations (~> 3.11.0)
34
- rspec-mocks (~> 3.11.0)
35
- rspec-core (3.11.0)
36
- rspec-support (~> 3.11.0)
37
- rspec-expectations (3.11.1)
31
+ rspec (3.12.0)
32
+ rspec-core (~> 3.12.0)
33
+ rspec-expectations (~> 3.12.0)
34
+ rspec-mocks (~> 3.12.0)
35
+ rspec-core (3.12.1)
36
+ rspec-support (~> 3.12.0)
37
+ rspec-expectations (3.12.2)
38
38
  diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.11.0)
40
- rspec-mocks (3.11.1)
39
+ rspec-support (~> 3.12.0)
40
+ rspec-mocks (3.12.4)
41
41
  diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.11.0)
43
- rspec-support (3.11.1)
44
- teLogger (0.2.0)
45
- toolrack (0.19.1)
42
+ rspec-support (~> 3.12.0)
43
+ rspec-support (3.12.0)
44
+ teLogger (0.2.2)
45
+ toolrack (0.20.2)
46
46
  base58
47
47
  tty-color (0.6.0)
48
48
  tty-cursor (0.7.1)
@@ -106,6 +106,7 @@ 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
110
  [$?, res, targetGem]
110
111
  else
111
112
  raise GemError, "Given Gemfile '#{gemfile}' not found"
@@ -1,5 +1,5 @@
1
1
 
2
2
 
3
3
  module DevopsAssist
4
- VERSION = "0.3.4"
4
+ VERSION = "0.3.6"
5
5
  end
@@ -19,27 +19,28 @@ module DevopsAssist
19
19
  vv << vers[1]
20
20
  vv << vers[0]
21
21
 
22
- vv << "Custom"
23
- vv << "Quit"
22
+ #vv << "Custom"
23
+ #vv << "Quit"
24
24
  #vers << [ \
25
25
  # "Maybe not now..." \
26
26
  # ,"Nah, forget it..." \
27
27
  #].sample
28
28
 
29
29
  vsel = pmt.select(" Please select one of the versions below:") do |menu|
30
- menu.choice "#{last_version} (current version - no change in version)", :no_change
31
30
  #vers.each do |v|
32
31
  vv.each do |v|
33
32
  menu.choice v
34
33
  end
34
+
35
+ menu.choice "#{last_version} (current version - no change in version)", last_version
36
+ menu.choice "Custom version number", :custom
37
+ menu.choice "Abort", :abort
35
38
  end
36
39
 
37
40
  case vsel
38
- when :no_change
39
- vsel = last_version
40
- when "Custom"
41
+ when :custom
41
42
  vsel = pmt.ask(" Please provide custom version no:", required: true)
42
- when vv[-1]
43
+ when :abort
43
44
  raise DevopsAssist::Error, " Aborted. Have a nice day! "
44
45
  end
45
46
 
@@ -25,7 +25,6 @@ namespace :devops do
25
25
 
26
26
  pmt = TTY::Prompt.new
27
27
 
28
-
29
28
  # let's mark the session to allow automated context switching
30
29
  ENV[DevopsAssist::EnvKeyGemReleasing] = "true"
31
30
 
@@ -36,7 +35,7 @@ namespace :devops do
36
35
  # select version
37
36
  #ver = DevopsAssist::VersionManager.prompt_version(gemName, rl.last_version_number(gemName))
38
37
  ver = DevopsAssist::VersionManager.prompt_version(gemName, gu.gem_version_string)
39
- pmt.say " Version no. '#{ver}' chosen", color: :yellow
38
+ pmt.say " Version '#{ver}' is chosen", color: :yellow
40
39
 
41
40
  selVerFile = gu.update_gem_version(ver) do |*args|
42
41
  ops = args.first
@@ -49,15 +48,24 @@ namespace :devops do
49
48
  end
50
49
  pmt.say " Version file updated", color: :yellow
51
50
 
51
+ # Add file changed by system into git first
52
+ miscFiles = []
53
+ miscFiles << selVerFile # version.rb
54
+ #miscFiles << DevopsAssist::ReleaseLogger::LOG_NAME # release_history.yml
55
+ #miscFiles << 'Gemfile.lock'
56
+ Rake::Task["devops:vcs:checkin_misc_files"].execute({ root: root, files: miscFiles, version: ver })
57
+ #pmt.say " Updated files during release prep have committed into version control", color: :yellow
58
+
52
59
 
53
60
  # check in source code
54
61
  # Check in must be done 1st or else the 'gem build' process will fail
55
62
  # because build will use git command. For any files that already deleted,
56
63
  # the build will failed to find the files and throw exception
64
+ # However, there are files that will changed after build i.e Gemfile.lock
57
65
  res = Rake::Task["devops:vcs:checkin_changes"].execute
58
66
  pmt.say " Workspace check in done\n", color: :yellow
59
67
 
60
- proceed = pmt.yes?(" Proceed to build the gem? ")
68
+ proceed = pmt.yes?(" Proceed to build the gem? ", color: :yellow)
61
69
  raise GitCliPrompt::UserAborted if not proceed
62
70
 
63
71
 
@@ -115,6 +123,13 @@ namespace :devops do
115
123
 
116
124
  Rake::Task["devops:vcs:push_source_code"].execute({ root: root, pmt: pmt })
117
125
 
126
+ install = pmt.yes?(" Install the released gem to local environment? ")
127
+ if install
128
+ STDOUT.puts `gem install pkg/#{gemName}-#{ver}.gem`
129
+ end
130
+
131
+ pmt.say " Gem #{gemName} version #{ver} released successfully ", color: :green
132
+
118
133
  rescue GitCliPrompt::UserAborted, GitCliPrompt::UserChangedMind, TTY::Reader::InputInterrupt
119
134
  STDOUT.puts
120
135
  rescue Exception => ex
data/tasks/gem.rake CHANGED
@@ -64,6 +64,9 @@ namespace :devops do
64
64
 
65
65
  if res.respond_to?(:success?)
66
66
  if res.success?
67
+ pmt.puts
68
+ pmt.puts out, color: :yellow
69
+ pmt.puts
67
70
  pmt.say " Gem published!\n", color: :yellow
68
71
  else
69
72
  pmt.say " Gem publishing failed. Return message :\n#{out}", color: :red
data/tasks/vcs.rake CHANGED
@@ -7,7 +7,12 @@ namespace :devops do
7
7
  desc "Checking in changes of source code"
8
8
  task :checkin_changes do
9
9
  cli = DevopsAssist::Vcs::Git::CliPrompt.new
10
- cli.commit(Dir.getwd)
10
+ cli.commit(Dir.getwd) do |ops|
11
+ case ops
12
+ when :raise_to_parent
13
+ true
14
+ end
15
+ end
11
16
  end
12
17
 
13
18
  desc "Checking in files generated by devops assist"
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.4
4
+ version: 0.3.6
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-26 00:00:00.000000000 Z
11
+ date: 2023-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toolrack