sti_deploy 0.1.0rc1 → 0.1.4

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
  SHA1:
3
- metadata.gz: 928e039c280f04e44a90c5553aa702437d90dffd
4
- data.tar.gz: 2852110951a268b5d48e28a42471c8a169899a92
3
+ metadata.gz: 88608439dca40b9d416ed6a0e1acb8fe7b18dff8
4
+ data.tar.gz: b308e3f846a885bd3ab439765737fdc673235ce5
5
5
  SHA512:
6
- metadata.gz: 29c54da5bfdc68d032e699d910a09bda9d9e7b2b45365de56673c2acc8f2e0e8c91a812e99d26d16fc5759b10af01c4457648992bd87159b472408d3fa55cd74
7
- data.tar.gz: d4472b475724f665af41d04a25e01e35aa1852e545df4b73c1da95d406497d82fc9f20401389ad2d4106cd68aed49996a6c10bb411c6c339a5d98215168799cf
6
+ metadata.gz: 6a7e573e0b4255522ad3169a56d744cb9ebc889a4ae5b20c41e350b96c0824248a83579434400ee79b567aa82c11279780f5d9574c6c59318735a1a7091c7454
7
+ data.tar.gz: 1c6bdf9ea4e300dfa7f30eeee5179f5f457fe0c7624b082566b34b5a4a3b875c0a8f228c7659935d4012e7aa9eff3320fc268733e38c053c6d4be0393b564a21
data/lang/en.yml CHANGED
@@ -14,5 +14,9 @@ en:
14
14
  git:
15
15
  by: by
16
16
  preparing: Setting up for deploy.
17
+ committing: "\nCommiting the new version number..."
18
+ merging: "\nMerging from \"%{origin}\" to \"%{target}\"..."
19
+ tagging: "\nCreating a new tag..."
17
20
  system:
18
21
  interrupted: "\n\nDeploy aborted. Bye-bye."
22
+ finished: "\nThe deploy init process has finished!"
data/lang/pt-BR.yml CHANGED
@@ -14,5 +14,9 @@ pt-BR:
14
14
  git:
15
15
  by: por
16
16
  preparing: Preparando para deploy.
17
+ committing: "\nComitando a nova versão..."
18
+ merging: "\nFazendo merge de \"%{origin}\" para \"%{target}\"..."
19
+ tagging: "\nCriando uma nova tag..."
17
20
  system:
18
21
  interrupted: "\n\nDeploy abortado. Bye-bye."
22
+ finished: "\nO processo de início do deploy está terminado!"
@@ -16,7 +16,7 @@ module StiDeploy
16
16
 
17
17
  def commit_merge_and_tag!
18
18
  git_commit!
19
- git_merge!
19
+ git_merge! unless same_origin_target_branches?
20
20
  git_tag!
21
21
  end
22
22
 
@@ -40,20 +40,24 @@ module StiDeploy
40
40
 
41
41
  def git_commit!
42
42
  read_release_message
43
+ Messages.puts('git.committing', color: :yellow)
43
44
  Git.add_version
44
45
  Git.commit(message: commit_message)
45
- Git.push(branch: Configuration.origin_branch(type))
46
+ Git.push(branch: origin_branch)
46
47
  end
47
48
 
48
49
  def git_merge!
49
- Git.checkout(branch: Configuration.target_branch(type))
50
- Git.pull(branch: Configuration.target_branch(type))
51
- Git.merge(branch: Configuration.origin_branch(type))
52
- Git.push(branch: Configuration.target_branch(type))
53
- Git.checkout(branch: Configuration.origin_branch(type))
50
+ Messages.puts('git.merging', origin: origin_branch, target: target_branch,
51
+ color: :yellow)
52
+ Git.checkout(branch: target_branch)
53
+ Git.pull(branch: target_branch)
54
+ Git.merge(branch: origin_branch)
55
+ Git.push(branch: target_branch)
56
+ Git.checkout(branch: origin_branch)
54
57
  end
55
58
 
56
59
  def git_tag!
60
+ Messages.puts('git.tagging', color: :yellow)
57
61
  Git.tag(version: version.to_s, message: message)
58
62
  Git.push_tags
59
63
  end
@@ -64,5 +68,17 @@ module StiDeploy
64
68
  return "#{preparing} #{message}" if git_user.nil? || git_user.empty?
65
69
  "#{by} #{git_user}: #{preparing} #{message}"
66
70
  end
71
+
72
+ def same_origin_target_branches?
73
+ origin_branch == target_branch
74
+ end
75
+
76
+ def origin_branch
77
+ Configuration.origin_branch(type)
78
+ end
79
+
80
+ def target_branch
81
+ Configuration.target_branch(type)
82
+ end
67
83
  end
68
84
  end
@@ -49,7 +49,7 @@ module StiDeploy
49
49
  def bump(deploy_type)
50
50
  old = to_s
51
51
  send("bump_#{deploy_type}")
52
- Messages.puts('version.increment', old: old, new: to_s)
52
+ Messages.puts('version.increment', old: old, new: to_s, color: :green)
53
53
  to_s
54
54
  end
55
55
 
data/lib/sti_deploy.rb CHANGED
@@ -23,6 +23,7 @@ module StiDeploy
23
23
  deploy = Deploy.new
24
24
  deploy.update_version!
25
25
  deploy.commit_merge_and_tag!
26
+ Messages.puts 'system.finished', color: :green
26
27
  rescue Interrupt
27
28
  Messages.puts 'system.interrupted', color: :red
28
29
  exit(-3)
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- VERSION = '0.1.0rc1'
3
+ VERSION = '0.1.4'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sti_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0rc1
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Castro Azevedo
@@ -117,9 +117,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - ">"
120
+ - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 1.3.1
122
+ version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
125
  rubygems_version: 2.6.13