git-maintain 0.4.0.pre.3.ge7030b9 → 0.5.0.pre.2.g67ac144
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/CHANGELOG +6 -0
- data/lib/branch.rb +14 -0
- 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: 37459a0823f1386afbc6d3f756f8e92760bd096aa6e0ad7608820df4ecfb6d64
|
4
|
+
data.tar.gz: abdb7db87ba388e5b46a55f3271ad51626a66ea030c5acf072dd259590dfb196
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be6186cebcd42e1c6c2d05c2065845c6a1cd348094a85051300f711123162555b51c36a7dfa96e35b38bfd0e9a40a3d0d5ffcd1a65bce88bbf243c23400cb619
|
7
|
+
data.tar.gz: bbabbba9ec3b17ccc46cc73f73ebe7cd65f77ad167f9a9f1ee48c15289e60c6d7d92b42aff99046600b68940c2784dc5ce78883987ddf4917993d0d6fb030f73
|
data/CHANGELOG
CHANGED
data/lib/branch.rb
CHANGED
@@ -73,6 +73,8 @@ module GitMaintain
|
|
73
73
|
optsParser.banner += "[-T]"
|
74
74
|
optsParser.on("-T", "--no-travis", "Ignore Travis build status and push anyway.") {
|
75
75
|
|val| opts[:no_travis] = true}
|
76
|
+
optsParser.on("-c", "--check", "Check if there is something to be pushed.") {
|
77
|
+
|val| opts[:check_only] = true}
|
76
78
|
when :steal
|
77
79
|
optsParser.banner += "[-a]"
|
78
80
|
optsParser.on("-a", "--all", "Check all commits from master. "+
|
@@ -271,6 +273,18 @@ module GitMaintain
|
|
271
273
|
puts "Build is not passed on travis. Skipping push to stable"
|
272
274
|
return
|
273
275
|
end
|
276
|
+
c1=@repo.runGit("rev-parse --verify --quiet #{@local_branch}")
|
277
|
+
c2=@repo.runGit("rev-parse --verify --quiet #{@remote_ref}")
|
278
|
+
if c1 == c2 then
|
279
|
+
puts "Stable is already up-to-date"
|
280
|
+
return
|
281
|
+
end
|
282
|
+
|
283
|
+
if opts[:check_only] == true then
|
284
|
+
GitMaintain::checkLog(opts, @local_branch, @remote_ref, "")
|
285
|
+
return
|
286
|
+
end
|
287
|
+
|
274
288
|
rep = GitMaintain::checkLog(opts, @local_branch, @remote_ref, "submit")
|
275
289
|
if rep == "y" then
|
276
290
|
@repo.runGit("push #{@repo.stable_repo} #{@local_branch}:#{@remote_branch}")
|