monos 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/mono.rb +16 -0
- data/lib/mono/git/tool.rb +2 -0
- data/lib/mono/version.rb +1 -1
- data/test/test_base.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 938f3fee4f29836650bf78e6a65caed685bda945
|
4
|
+
data.tar.gz: 294077f35cb57a027a82d0b9533f1a80cc1f1fe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb3f0d236dc69a7599115f31ab4a198b49c79e103e20162f158093a201bedeae26613b32e5126105aab00e2acba765d0525c9e3c73ed5aaa20eff9a9385c4010
|
7
|
+
data.tar.gz: 5f728eddb54857a5f3983e8be2bfc8a490c8b4ea4707a3f9928ab5ac223ae9a0c79545662c88e7e3217822ecc3f0cb906e41cd82d60f062158b26c8987427aed
|
data/README.md
CHANGED
@@ -15,11 +15,23 @@
|
|
15
15
|
The `mono` (or short `mo`) command line tool lets you run
|
16
16
|
git commands on multiple repo(sitories) with a single command.
|
17
17
|
|
18
|
+
|
19
|
+
|
20
|
+
### Setup
|
21
|
+
|
22
|
+
#### 1) The monorepo (single source tree) root - `MOPATH`
|
23
|
+
|
24
|
+
Use the `MOPATH` environment variable to set the monorepo (single source tree) root
|
25
|
+
path. The builtin default for now is `/sites`.
|
26
|
+
|
27
|
+
#### 2) The configuration / manifest file to list all repos - `monorepo.yml`
|
28
|
+
|
29
|
+
|
18
30
|
Add all repo(sitories) to the `monorepo.yml` that you want
|
19
|
-
to be part of the "virtual" all-in-one / single mono source tree
|
20
|
-
Example:
|
31
|
+
to be part of the "virtual" all-in-one / single mono source tree
|
32
|
+
in your project. Example:
|
21
33
|
|
22
|
-
```
|
34
|
+
``` yaml
|
23
35
|
####################
|
24
36
|
# checkout skripts (auto-update machinery)
|
25
37
|
yorobot:
|
@@ -43,33 +55,26 @@ openfootball:
|
|
43
55
|
```
|
44
56
|
|
45
57
|
|
46
|
-
### MOPATH - The monorepo (single source tree) root
|
47
|
-
|
48
|
-
Use the `MOPATH` environment variable to set the monorepo (single source tree) root
|
49
|
-
path. The builtin default for now is `/sites`.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
58
|
|
54
59
|
### Commands
|
55
60
|
|
56
|
-
`status` • `sync`
|
61
|
+
`status` • `sync` • `env`
|
57
62
|
|
58
63
|
### `status` Command
|
59
64
|
|
60
65
|
Use the `status` command to check for changes (will use `git status --short`) on all repos. Example:
|
61
66
|
|
62
|
-
|
67
|
+
```
|
63
68
|
$ mono status
|
64
69
|
$ mono # status is the default command
|
65
70
|
$ mo status # mo is a "shortcut" convenience alias for mono
|
66
71
|
$ mo stat
|
67
72
|
$ mo
|
68
|
-
|
73
|
+
```
|
69
74
|
|
70
75
|
resulting in something like:
|
71
76
|
|
72
|
-
|
77
|
+
```
|
73
78
|
2 change(s) in 9 repo(s) @ 3 org(s)
|
74
79
|
|
75
80
|
== yorobot@cache.csv - CHANGES:
|
@@ -85,30 +90,35 @@ RM monos/lib/monoscript.rb -> monos/lib/monos.rb
|
|
85
90
|
|
86
91
|
== yorobot@football.csv - CHANGES:
|
87
92
|
?? footballdata/
|
88
|
-
|
93
|
+
```
|
89
94
|
|
90
95
|
|
91
96
|
|
92
97
|
### `sync` Command
|
93
98
|
|
94
|
-
Note: `install` or `get` or `up` are all aliases that you can use for `sync`.
|
95
|
-
|
96
|
-
Note: `moget` is a shortcut convenience command for `mono get` (or, that is, `mono sync`).
|
97
|
-
|
98
99
|
|
99
100
|
Use the `sync` command to sync up (pull) changes (will use `git pull --ff-only`) on all existing repos and `git clone` for new not-yet-cloned repos.
|
100
101
|
|
101
102
|
Example:
|
102
103
|
|
103
|
-
|
104
|
+
```
|
104
105
|
$ mono sync
|
105
106
|
$ mono install # install is an alias for sync
|
106
107
|
$ mono get # get is another alias for sync
|
107
108
|
$ mo sync # mo is a "shortcut" convenience alias for mono
|
108
109
|
$ mo get
|
109
110
|
$ moget # moget is a "shortcut" convenience alis for mono get
|
110
|
-
|
111
|
+
```
|
112
|
+
|
113
|
+
Note: `install` or `get` or `up` are all aliases that you can use for `sync`.
|
114
|
+
|
115
|
+
Note: `moget` is a shortcut convenience command for `mono get` (or, that is, `mono sync`).
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
### `env` Command
|
111
120
|
|
121
|
+
Use the `env` command to check your `mono` environment setup.
|
112
122
|
|
113
123
|
|
114
124
|
That's all for now.
|
data/lib/mono.rb
CHANGED
@@ -17,4 +17,20 @@ require 'mono/git/status'
|
|
17
17
|
require 'mono/git/tool'
|
18
18
|
|
19
19
|
|
20
|
+
|
21
|
+
|
22
|
+
module Mono
|
23
|
+
def self.env ## check environment setup
|
24
|
+
puts "Mono.root (MOPATH): >#{Mono.root}<"
|
25
|
+
puts "Mono::Module.root: >#{Mono::Module.root}<"
|
26
|
+
puts "git version:"
|
27
|
+
Git.version
|
28
|
+
puts
|
29
|
+
puts "monorepo.yml:"
|
30
|
+
pp Mono.monofile
|
31
|
+
end
|
32
|
+
end # module Mono
|
33
|
+
|
34
|
+
|
35
|
+
|
20
36
|
puts Mono::Module.banner # say hello
|
data/lib/mono/git/tool.rb
CHANGED
data/lib/mono/version.rb
CHANGED
data/test/test_base.rb
CHANGED