git_repo_upgrader 0.0.1 → 0.0.2
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 -5
- data/lib/git_repo_upgrader/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: c3b689bc3ce29e0e39f14d8d2671068e68a0153694cb432a0e69b6886a4208d8
|
4
|
+
data.tar.gz: eeb03c644824663a38dcb7ce79690329fa30718d113b566bacbce7bbb9989787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c73b162e8965a725f61b4d5be4c59c87222f743b3a6bdcd6a9319437bcba0d64b9b0c018f3507fd0b425e76036a213edf4a9eeabbd0edf47d244a52525f60f18
|
7
|
+
data.tar.gz: 6c6beed7140f6dcd74967b02ec239b5405e18e5bbe67309eb9c7de884cddc497033c206ea0d2006fee830b3c9247661d20c5754fa6771a4394a9fb3f2afa13cc
|
data/lib/git_repo_upgrader.rb
CHANGED
@@ -108,14 +108,19 @@ class GitRepoUpgrader
|
|
108
108
|
end
|
109
109
|
if yes_no == 'y'
|
110
110
|
Dir.chdir PROJECT_DIR
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
111
|
+
# add
|
112
|
+
git_commit_command1 = %Q(git add "#{files.values.join('" "')}")
|
113
|
+
puts " #{git_commit_command1}".blue
|
114
|
+
git_result1 = `#{git_commit_command1}`
|
115
|
+
# commit
|
116
|
+
git_commit_command2 = %Q(git commit "#{files.values.join('" "')}" -m "upgrade #{repo_name}")
|
117
|
+
puts " #{git_commit_command2}".blue
|
118
|
+
git_result2 = `#{git_commit_command2}`
|
119
|
+
if git_result2.include? 'no changes added to commit'
|
115
120
|
puts
|
116
121
|
puts " You already had the latest version, nothing to commit!".red
|
117
122
|
else
|
118
|
-
puts
|
123
|
+
puts git_result2.green
|
119
124
|
end
|
120
125
|
end
|
121
126
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_repo_upgrader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthäus J. N. Beyrle
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|