multipush 0.0.1 → 0.0.2
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.
- data/README.rdoc +17 -8
- data/lib/multipush/base.rb +5 -2
- data/lib/multipush.rb +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -8,7 +8,15 @@ This is multipush, a nifty tool to safely back up your source code from multiple
|
|
8
8
|
|
9
9
|
== FEATURES/PROBLEMS:
|
10
10
|
|
11
|
-
|
11
|
+
You probably know the command:
|
12
|
+
|
13
|
+
$ git push origin master
|
14
|
+
|
15
|
+
You can use this just fine for one, maybe a couple of repos.
|
16
|
+
|
17
|
+
If you have more than a couple of repos, this becomes unmanageable.
|
18
|
+
|
19
|
+
This is where multipush comes in.
|
12
20
|
|
13
21
|
== SYNOPSIS:
|
14
22
|
|
@@ -20,13 +28,14 @@ Push multiple Git repos to one or more remotes.
|
|
20
28
|
|
21
29
|
== INSTALL:
|
22
30
|
|
23
|
-
Create a config file multipush.yml
|
24
|
-
|
31
|
+
Create a config file multipush.yml two directories above where your repos are.
|
32
|
+
You could make a different directory for each category, e.g. 'ruby', 'rails' or just put everything in one big directory.
|
25
33
|
|
26
|
-
-
|
27
|
-
|
28
|
-
|
29
|
-
|
34
|
+
- home <--- put multipush.yml here
|
35
|
+
- ruby
|
36
|
+
\-- my_rails_project
|
37
|
+
\-- my_ruby_project
|
38
|
+
\-- another_git_project
|
30
39
|
|
31
40
|
For an example on how to set up the config file, check out the example file multipush.yml in the examples directory.
|
32
41
|
|
@@ -67,4 +76,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
67
76
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
68
77
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
69
78
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
70
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
79
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/multipush/base.rb
CHANGED
@@ -7,11 +7,13 @@ require 'yaml'
|
|
7
7
|
# will not run on Windows. sorry.
|
8
8
|
module Multipush
|
9
9
|
class Base
|
10
|
+
attr_accessor :logfile
|
11
|
+
|
10
12
|
def log(str)
|
11
13
|
str = " [#{Time.now}] #{str}"
|
12
14
|
|
13
15
|
puts str
|
14
|
-
system("echo '#{str}' >>
|
16
|
+
system("echo '#{str}' >> #{@logfile}")
|
15
17
|
end
|
16
18
|
|
17
19
|
def my_system(cmd)
|
@@ -23,8 +25,9 @@ module Multipush
|
|
23
25
|
end
|
24
26
|
|
25
27
|
def go!(params = {})
|
28
|
+
@logfile = "#{Dir.pwd}/multipush.log"
|
26
29
|
# clear log file
|
27
|
-
system("cat /dev/null >
|
30
|
+
system("cat /dev/null > #{@logfile}")
|
28
31
|
|
29
32
|
git_cmd = "git"
|
30
33
|
remote_prefix = "multipush_"
|
data/lib/multipush.rb
CHANGED