git_repo_upgrader 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git_repo_upgrader.rb +10 -4
- data/lib/git_repo_upgrader/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0345825f5246e6d66a553508642ddf7251d9a4f07fdf9033169ed3474aba3072'
|
4
|
+
data.tar.gz: 2becbc7c0a41fd47307a6b4ab7c1577a04f9474e9c50e826288443ef10536e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a326537cc36bb640805db961d557b1b083a96680b71ac41af28447806d6c8f4f7c82e561c16fccbc6bfcacd8d10e8a5e124d51cd8cb0996c31ae4c02506d294
|
7
|
+
data.tar.gz: 88f84cfe06bf259b18ca45f501368f7766035cb592a994eafb18a00675bf632944c6ed3e09dd7a211fc6296d8361e95c36cb2672e41df616f9ef5cc1676e9605
|
data/lib/git_repo_upgrader.rb
CHANGED
@@ -62,10 +62,16 @@ module GitRepoUpgrader
|
|
62
62
|
print tmp_dirname + ' ... '
|
63
63
|
Dir.chdir tmp_dirname
|
64
64
|
puts 'done'.green
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
begin
|
66
|
+
puts ' - checkoutA repository ' + source + " (#{branch}) ... "
|
67
|
+
git_command = "git clone --single-branch --branch #{branch} #{source}"
|
68
|
+
puts ' ' + git_command.blue
|
69
|
+
git_result = system(git_command)
|
70
|
+
raise "invalid username or password" unless git_result
|
71
|
+
rescue RuntimeError => e
|
72
|
+
puts e.to_s.red
|
73
|
+
retry
|
74
|
+
end
|
69
75
|
puts ' done'.green
|
70
76
|
puts
|
71
77
|
repo_dir = Dir['*'].first
|