codebuild 0.6.5 → 0.6.6
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/.ruby-version +1 -1
- data/CHANGELOG.md +3 -0
- data/lib/codebuild/dsl/project.rb +1 -1
- data/lib/codebuild/help/init.md +20 -9
- data/lib/codebuild/init.rb +18 -3
- data/lib/codebuild/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18b376bae602790fd844fdf4f02845330dc144aafd4083ab40501c711a6891e0
|
4
|
+
data.tar.gz: 21d8abb7b0ba5b3716a9fb6adc1e8f291dc977b668dddc7b1b2d4d92254afabd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 162b1776eeca46fa152344289998fbdae37435ae38e243914e9aeff25221353422a8d746c963f4fcb46add4273485153e76383cbca1460fa6302366e70c29de7
|
7
|
+
data.tar.gz: 49e2b6e731571f3a8b1c812b860ff5001d3a34d673d35c023f9687ac5d1647d791d9699c35bb3971e5e93e3063cde7f8ce908b6ad578b6bd412e3b62f4f80a05
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5.
|
1
|
+
2.5.6
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.6.6]
|
7
|
+
- add mode option: bare and full
|
8
|
+
|
6
9
|
## [0.6.5]
|
7
10
|
- allow no settings.yml file
|
8
11
|
|
@@ -48,7 +48,7 @@ module Codebuild::Dsl
|
|
48
48
|
location: options[:location],
|
49
49
|
git_clone_depth: 1,
|
50
50
|
git_submodules_config: { fetch_submodules: true },
|
51
|
-
build_spec: options[:buildspec] || ".codebuild/buildspec.yml",
|
51
|
+
build_spec: options[:buildspec] || ".codebuild/buildspec.yml", # options[:buildspec] accounts for type already
|
52
52
|
report_build_status: true,
|
53
53
|
}
|
54
54
|
|
data/lib/codebuild/help/init.md
CHANGED
@@ -14,9 +14,7 @@ Thi generates the cb files under the `.codebuild/unit` folder.
|
|
14
14
|
.codebuild
|
15
15
|
└── unit
|
16
16
|
├── buildspec.yml
|
17
|
-
|
18
|
-
├── role.rb
|
19
|
-
└── schedule.rb
|
17
|
+
└── project.rb
|
20
18
|
|
21
19
|
To tell the codebuild tool to use these files, you specify the `--type` option as a part of the other commands. Examples:
|
22
20
|
|
@@ -30,14 +28,27 @@ So if you need multiple CodeBuild projects that perform different tasks but are
|
|
30
28
|
.codebuild
|
31
29
|
├── deploy
|
32
30
|
│ ├── buildspec.yml
|
33
|
-
│
|
34
|
-
│ ├── role.rb
|
35
|
-
│ └── schedule.rb
|
31
|
+
│ └── project.rb
|
36
32
|
└── unit
|
37
33
|
├── buildspec.yml
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
└── project.rb
|
35
|
+
|
36
|
+
## Mode Option
|
37
|
+
|
38
|
+
By default, `cb init` generates a very lightweight structure. You can have it also generate a "full" structure with the `--mode` option. Example.
|
39
|
+
|
40
|
+
$ cb init --mode full
|
41
|
+
$ tree .codebuild
|
42
|
+
.codebuild
|
43
|
+
├── buildspec.yml
|
44
|
+
├── project.rb
|
45
|
+
├── role.rb
|
46
|
+
├── schedule.rb
|
47
|
+
├── settings.yml
|
48
|
+
└── variables
|
49
|
+
├── base.rb
|
50
|
+
├── development.rb
|
51
|
+
└── production.rb
|
41
52
|
|
42
53
|
## Custom Templates
|
43
54
|
|
data/lib/codebuild/init.rb
CHANGED
@@ -5,10 +5,10 @@ module Codebuild
|
|
5
5
|
[
|
6
6
|
[:force, type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
|
7
7
|
[:name, desc: "CodeBuild project name"],
|
8
|
+
[:mode, default: "bare", desc: "Modes: bare or full"],
|
8
9
|
[:template, desc: "Custom template to use"],
|
9
10
|
[:template_mode, desc: "Template mode: replace or additive"],
|
10
11
|
[:type, desc: "Type option creates a subfolder under .codebuild"],
|
11
|
-
[:variables, type: :boolean, default: false, desc: "Create variables starter files"],
|
12
12
|
]
|
13
13
|
end
|
14
14
|
cli_options.each { |o| class_option(*o) }
|
@@ -37,7 +37,12 @@ module Codebuild
|
|
37
37
|
puts "Initialize codebuild top-level folder"
|
38
38
|
dest = ".codebuild"
|
39
39
|
excludes = %w[.git]
|
40
|
-
|
40
|
+
if @options[:mode] == "bare"
|
41
|
+
excludes += %w[
|
42
|
+
settings.yml
|
43
|
+
variables
|
44
|
+
]
|
45
|
+
end
|
41
46
|
pattern = Regexp.new(excludes.join('|'))
|
42
47
|
directory "top", dest, exclude_pattern: pattern
|
43
48
|
end
|
@@ -46,7 +51,17 @@ module Codebuild
|
|
46
51
|
puts "Initialize codebuild project in .codebuild"
|
47
52
|
dest = ".codebuild"
|
48
53
|
dest = "#{dest}/#{@options[:type]}" if @options[:type]
|
49
|
-
|
54
|
+
|
55
|
+
excludes = %w[.git]
|
56
|
+
if @options[:mode] == "bare"
|
57
|
+
excludes += %w[
|
58
|
+
role.rb
|
59
|
+
schedule.rb
|
60
|
+
]
|
61
|
+
end
|
62
|
+
|
63
|
+
pattern = Regexp.new(excludes.join('|'))
|
64
|
+
directory "project", dest, exclude_pattern: pattern
|
50
65
|
end
|
51
66
|
|
52
67
|
private
|
data/lib/codebuild/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codebuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -339,7 +339,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
339
339
|
- !ruby/object:Gem::Version
|
340
340
|
version: '0'
|
341
341
|
requirements: []
|
342
|
-
rubygems_version: 3.0.
|
342
|
+
rubygems_version: 3.0.6
|
343
343
|
signing_key:
|
344
344
|
specification_version: 4
|
345
345
|
summary: CodeBuild DSL Tool to Quickly Create CodeBuild Project
|