git-bundle 1.0.14 → 1.0.15
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.lock +1 -1
- data/lib/git_bundle/commands/push.rb +14 -0
- data/lib/git_bundle/console.rb +6 -1
- data/lib/git_bundle/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12b776d0338d7edbb3ecb6a8e6c41f5489778f61e0d1bd5304d2dd131eb56371
|
4
|
+
data.tar.gz: e03aa0c6178a9c3a2a15e2f2103381226df4aba8e1da657aa00e8b74ef5f6b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b137c0527c447066095068e005691b3e186fd21e7048513d91411795a20925f8cb4c7ad19daf34a4d4f048199d087d37065d67e5b5f4d5602f085e64c797850d
|
7
|
+
data.tar.gz: f6fa7c3fabcee252b780bcbbb476c260ddd634fea984b57d089538e70fcffa8de94999494ee78b81dede17f862b2b6b2a65425b7a73e4aac609fda58bb6b4482
|
data/Gemfile.lock
CHANGED
@@ -66,6 +66,7 @@ module GitBundle
|
|
66
66
|
end
|
67
67
|
|
68
68
|
private
|
69
|
+
|
69
70
|
def prompt_confirm
|
70
71
|
if @project.main_repository.file_changed?('Gemfile')
|
71
72
|
puts_error 'Your Gemfile has uncommitted changes. Commit them first before pushing.'
|
@@ -74,6 +75,7 @@ module GitBundle
|
|
74
75
|
|
75
76
|
commits_to_push = false
|
76
77
|
upstream_branches_missing = []
|
78
|
+
diverged_repos = []
|
77
79
|
@project.repositories.each do |repo|
|
78
80
|
commits = repo.commits_not_pushed
|
79
81
|
puts_repo_heading(repo)
|
@@ -83,6 +85,7 @@ module GitBundle
|
|
83
85
|
puts 'No changes.'
|
84
86
|
else
|
85
87
|
commits_to_push = true
|
88
|
+
diverged_repos << repo if repo.branch != @project.main_repository.branch
|
86
89
|
puts commits
|
87
90
|
end
|
88
91
|
else
|
@@ -91,6 +94,17 @@ module GitBundle
|
|
91
94
|
end
|
92
95
|
end
|
93
96
|
|
97
|
+
if diverged_repos.any?
|
98
|
+
puts_prompt("\nThese repositories have changes and have diverged from the main application's branch (#{@project.main_repository.branch})")
|
99
|
+
puts_diverged_repos(diverged_repos)
|
100
|
+
puts_prompt("\nDo you want to continue? (Y/N)")
|
101
|
+
if STDIN.getch.upcase == 'Y'
|
102
|
+
puts ''
|
103
|
+
else
|
104
|
+
return false
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
94
108
|
if !upstream_branches_missing.empty?
|
95
109
|
puts_prompt("Missing upstream branches (#{upstream_branches_missing.join(', ')}) will be created and changes pushed.")
|
96
110
|
puts_prompt('Do you want to continue? (Y/N)')
|
data/lib/git_bundle/console.rb
CHANGED
@@ -23,6 +23,10 @@ module GitBundle
|
|
23
23
|
puts colorize("\n=== #{repo.name} (#{repo.branch} ⇒ #{new_branch})", COLORS[:heading], true)
|
24
24
|
end
|
25
25
|
|
26
|
+
def puts_diverged_repos(repos)
|
27
|
+
repos.each { |repo| puts colorize(" #{repo.name} (#{repo.branch})", COLORS[:prompt], true) }
|
28
|
+
end
|
29
|
+
|
26
30
|
def puts_heading(text)
|
27
31
|
puts colorize("\n=== #{text}", COLORS[:heading])
|
28
32
|
end
|
@@ -88,6 +92,7 @@ module GitBundle
|
|
88
92
|
end
|
89
93
|
|
90
94
|
private
|
95
|
+
|
91
96
|
def colorize(text, color_code, bold = false)
|
92
97
|
if bold
|
93
98
|
"\e[1m\e[#{color_code}m#{text}\e[0m"
|
@@ -96,4 +101,4 @@ module GitBundle
|
|
96
101
|
end
|
97
102
|
end
|
98
103
|
end
|
99
|
-
end
|
104
|
+
end
|
data/lib/git_bundle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-bundle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Pretorius
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|