monorepo 0.0.3 → 0.0.4
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/README.md +4 -1
- data/Rakefile +57 -0
- data/exe/monorepo +1 -1
- data/lib/commands/ls.rb +7 -0
- data/lib/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9239dc8817c27229af45ae91e94b0bb4e32be221bf8b408f671cf0d3b627d52a
|
|
4
|
+
data.tar.gz: 100d30035993ccc68bf2abf0277b7c92921655ad54c635f9503ca550fbaca4a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5972fc816c23b98d6391c1d27567d18413f02e92cc7c313f1c628a4b875f17b8fc846397cb3127c0d2d5ba514fa125eeae52caf37d36ac4d4e3576a5a3590738
|
|
7
|
+
data.tar.gz: e0a9d002dccbadb42375e33dba3c6a256e17ef795eb818c10036478dedd0c3f70d0595b596bbbd8ddb1c8fc7390f0a62c1ce78c75d7e36081b04ede9bbb2a323
|
data/README.md
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
[](https://badge.fury.io/rb/monorepo)
|
|
4
4
|
[](https://travis-ci.org/kamataryo/monorepo)
|
|
5
5
|
|
|
6
|
-
Ruby based
|
|
6
|
+
[under-development] Ruby based monorepo management tool like [Lerna](https://lernajs.io/).
|
|
7
|
+
Monorepo is a single repository which hosts multiple libraries.
|
|
8
|
+
You can arrange and integrate lint, test, release and other workflows with monorepo.
|
|
9
|
+
[Babel](https://babeljs.io/), [ESLint](https://eslint.org/) and other projects likely has plugin ecosystem take monorepo strategy.
|
|
7
10
|
|
|
8
11
|
## Installation
|
|
9
12
|
|
data/Rakefile
CHANGED
|
@@ -12,3 +12,60 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
12
12
|
task s: [:spec]
|
|
13
13
|
task test: [:spec]
|
|
14
14
|
task t: [:test]
|
|
15
|
+
|
|
16
|
+
# increments
|
|
17
|
+
|
|
18
|
+
def increment_version(section)
|
|
19
|
+
regex = /(?<major>[0-9]+)\.(?<minor>[0-9]+)\.(?<patch>[0-9]+)/
|
|
20
|
+
version_file = './lib/version.rb'
|
|
21
|
+
source = ''
|
|
22
|
+
|
|
23
|
+
File.open(version_file, 'r+') do |f|
|
|
24
|
+
source = f.read
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
matches = source.match(regex)
|
|
28
|
+
versions = {
|
|
29
|
+
major: matches[:major],
|
|
30
|
+
minor: matches[:minor],
|
|
31
|
+
patch: matches[:patch],
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
old_version_text = [
|
|
35
|
+
versions[:major],
|
|
36
|
+
versions[:minor],
|
|
37
|
+
versions[:patch],
|
|
38
|
+
].join '.'
|
|
39
|
+
|
|
40
|
+
versions[section] = (versions[section].to_i + 1).to_s
|
|
41
|
+
if section == :major
|
|
42
|
+
versions[:minor] = '0'
|
|
43
|
+
versions[:patch] = '0'
|
|
44
|
+
elsif section == :minor
|
|
45
|
+
versions[:patch] = '0'
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
new_version_text = [
|
|
49
|
+
versions[:major],
|
|
50
|
+
versions[:minor],
|
|
51
|
+
versions[:patch],
|
|
52
|
+
].join '.'
|
|
53
|
+
|
|
54
|
+
File.open(version_file, 'w') do |f|
|
|
55
|
+
f.write source.gsub(regex, new_version_text)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
puts "increment #{old_version_text} to #{new_version_text}."
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
task :patch do
|
|
62
|
+
increment_version :patch
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
task :minor do
|
|
66
|
+
increment_version :minor
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
task :major do
|
|
70
|
+
increment_version :major
|
|
71
|
+
end
|
data/exe/monorepo
CHANGED
data/lib/commands/ls.rb
ADDED
data/lib/version.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
MONOREPO_VERSION = '0.0.
|
|
1
|
+
MONOREPO_VERSION = '0.0.4'.freeze
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: monorepo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kamataryo
|
|
@@ -104,6 +104,7 @@ files:
|
|
|
104
104
|
- exe/monorepo
|
|
105
105
|
- lib/commands/exec.rb
|
|
106
106
|
- lib/commands/init.rb
|
|
107
|
+
- lib/commands/ls.rb
|
|
107
108
|
- lib/commands/rake.rb
|
|
108
109
|
- lib/monorepo.rb
|
|
109
110
|
- lib/version.rb
|