ggsm 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +8 -0
- data/bin/ggsm +2 -0
- data/lib/ggsm.rb +29 -0
- data/test/test_ggsm.rb +6 -0
- metadata +48 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eb2c2037175994ed2bd23520d559bdb762590637
|
4
|
+
data.tar.gz: 17769fd7d42ac88098c69e95c7d7f5ee20aeebba
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8d802ef18b80139965f6eefe6f94fe621274a1bc3d505fb55e0e3ac77a3e3b2342fcf0eeb9d8ee3363b206ebebf544ed19f91e70772a352fcff143bc34c9d125
|
7
|
+
data.tar.gz: d7cffcb433da0114517f9ba350dc0896103d1730270abc1b9d07854bd4e8ecb8e179178ccfb80bebce56be49fc1bf61c6347f0aa0ddeffe192ee1b164366ab7a
|
data/Rakefile
ADDED
data/bin/ggsm
ADDED
data/lib/ggsm.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
command = ""
|
3
|
+
|
4
|
+
ARGV.each do |arg|
|
5
|
+
command = "#{command} #{arg}"
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
if ARGV[0] == "update"
|
10
|
+
command = "git submodule update --init --recursive"
|
11
|
+
elsif ARGV[0] == "commit" || ARGV[0] == "ci"
|
12
|
+
if(ARGV[1] == "-m")
|
13
|
+
splitCommand = command.split("-m ")
|
14
|
+
command = "git#{splitCommand[0]}#{ARGV[1]} \"#{splitCommand[1]}\""
|
15
|
+
else
|
16
|
+
command = "git#{command}"
|
17
|
+
end
|
18
|
+
command = "git submodule foreach #{command};git add .;#{command}"
|
19
|
+
else
|
20
|
+
command = "git#{command};git submodule foreach git#{command}"
|
21
|
+
end
|
22
|
+
|
23
|
+
puts "执行: #{command}"
|
24
|
+
system command
|
25
|
+
|
26
|
+
if ARGV[0] == "pull" || ((ARGV[0] == "checkout" || ARGV[0] == "co") && (ARGV[1] != "-b" || ARGV[1] != "-d" || ARGV[1] != "-D"))
|
27
|
+
puts "刷新子模块:ggsm update"
|
28
|
+
system "git submodule update --init --recursive"
|
29
|
+
end
|
data/test/test_ggsm.rb
ADDED
metadata
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ggsm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- YoKey
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-05-04 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A gem for gitsubmodule
|
14
|
+
email: yokeyword@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- Rakefile
|
20
|
+
- lib/ggsm.rb
|
21
|
+
- bin/ggsm
|
22
|
+
- test/test_ggsm.rb
|
23
|
+
homepage: http://rubygems.org/gems/ggsm
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
metadata: {}
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 2.0.14.1
|
44
|
+
signing_key:
|
45
|
+
specification_version: 1
|
46
|
+
summary: ggsm!
|
47
|
+
test_files:
|
48
|
+
- test/test_ggsm.rb
|