minfra-cli 1.4.4 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +3 -0
- data/Rakefile +6 -0
- data/lib/minfra/cli/commands/project/branch.rb +9 -5
- data/lib/minfra/cli/config.rb +5 -0
- data/lib/minfra/cli/version.rb +1 -1
- data/templates/project/dev/bin/runner +13 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d8c4fc413b6865291c1f47e12581c0f11131008f4852742969fb49a8be4272d
|
4
|
+
data.tar.gz: 7e1eb348156ba8adb74bf7f5bb5055853c31a3c2802fa77497c7a529573f9d23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efa9ca0853ee602c708770a42cd6c1269f996dbcb70d4170cb630b815df161bc280bd5afb1ce608a4afefa699a6df78fa22c099260bfe3853ce4da7b8a601745
|
7
|
+
data.tar.gz: 28e53a02daacbe1c3ccc33fa2e273a52ac04c7b9189c559a93b7d4fd5840bae0eb837ebbee16e74df533dd574b84eb350805ffca22bad2e4da09b209af7d916a
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Rakefile
ADDED
@@ -4,12 +4,16 @@ module Minfra
|
|
4
4
|
class Branch < Command
|
5
5
|
|
6
6
|
desc "create 'story desc'", 'create branch'
|
7
|
+
option :prefix, type: :string, desc: "don't use your git email address or project.branch.create.prefix or identity.email"
|
7
8
|
def create(story_desc)
|
8
|
-
story_desc = story_desc.gsub(/[^0-9a-z]/i, '_')
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
story_desc = story_desc.gsub(/[^0-9a-z\-]/i, '_')
|
10
|
+
prefix = options[:prefix] || Minfra::Cli.config.project.dig('project','branch', 'create', 'prefix')
|
11
|
+
unless prefix
|
12
|
+
email = Minfra::Cli.config.project.dig('identity', 'email') || `git config user.email`
|
13
|
+
fullname = email.split('@').first
|
14
|
+
prefix = fullname[0] + fullname.split('.').last
|
15
|
+
end
|
16
|
+
Runner.run("git checkout -b #{prefix}_#{story_desc}_$(date +%Y%m%d)")
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
data/lib/minfra/cli/config.rb
CHANGED
@@ -56,6 +56,11 @@ module Minfra
|
|
56
56
|
@config = Hashie::Mash.new({})
|
57
57
|
end
|
58
58
|
@project = Hashie::Mash.new(JSON.parse(Minfra::Cli::Templater.render(File.read(@project_config_path),{})))
|
59
|
+
@project= @project.
|
60
|
+
deep_merge(@config)
|
61
|
+
# deep_merge(@project.environments[@orch_env]).
|
62
|
+
# deep_merge(@orch_env_config)
|
63
|
+
|
59
64
|
end
|
60
65
|
|
61
66
|
def load(orch_env)
|
data/lib/minfra/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minfra-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Schrammel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- Gemfile
|
158
158
|
- Gemfile.lock
|
159
159
|
- README.md
|
160
|
+
- Rakefile
|
160
161
|
- bin/build
|
161
162
|
- bin/console
|
162
163
|
- bin/container_exec
|
@@ -211,6 +212,7 @@ files:
|
|
211
212
|
- templates/kind.yaml.erb
|
212
213
|
- templates/kube_config.yaml.erb
|
213
214
|
- templates/minfra_config.json.erb
|
215
|
+
- templates/project/dev/bin/runner
|
214
216
|
homepage: https://github.com/fixingthenet/minfra-cli
|
215
217
|
licenses:
|
216
218
|
- MIT
|