build 2.7.0 → 2.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '00349494157af5d057e1ee2a70c3b65c8dd6873fd60419e50f90cb47d2d77018'
4
- data.tar.gz: 0131571a8d92702daba61ab85c00ede57e1856505ea06a39e504296759a8e123
3
+ metadata.gz: 9be6ae7b6f18b932ee30e00ac9951d3095215722bc8ff479a58a5c51cd7f81e5
4
+ data.tar.gz: 3afcfb408bb6b50028db3454fa457d35e54a5fa28e1caec6761d32eed2c9f16f
5
5
  SHA512:
6
- metadata.gz: c3196a81c93111aa37ba354b225c5796d6c9600205e229a863865c84c7b29d4bf7e817af4a41a8db50ced349a1b68feb281708ac765e089d9dbe576496576fce
7
- data.tar.gz: cce38609f20d57f6d751a5ba2ae80f321bc8d16eca34fb0f512d3b514d5695cc3bc418e9dee904ae1c821d10cd7cf67308fb13f1a28331d28889135f177a10fa
6
+ metadata.gz: b8d546ed317a43d2f41bf5c356c84b7fcd05040993041367b3c7197334a003f5dace3866fb3133033fa0e18c0ca814c98675c7a16f82726396fd30ca587a4eb8
7
+ data.tar.gz: c77c91809ebe9132923e383f618fef77e49a8571cdbd670b538625bb003cff57dd1dc0a60da5c344bb3a344326fcea7b5c4a8e35e9f92c5529ca6c8f2600ea9c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,70 @@
1
+ # Getting Started
2
+
3
+ This guide explains how to get started with `build`, a task-driven build system similar to make.
4
+
5
+ ## Installation
6
+
7
+ Add the gem to your project:
8
+
9
+ ~~~ bash
10
+ $ bundle add build
11
+ ~~~
12
+
13
+ ## Core Concepts
14
+
15
+ `build` has several core concepts:
16
+
17
+ - A {ruby Build::Rule} which represents a named build operation with typed input and output parameters.
18
+ - A {ruby Build::Rulebook} which is a collection of rules organized by process name for fast lookup.
19
+ - A {ruby Build::Controller} which manages the build graph and executes rules concurrently.
20
+
21
+ ## Usage
22
+
23
+ Define rules using `Build::Rule` inside a build environment, then organize them into a rulebook:
24
+
25
+ ~~~ ruby
26
+ require "build/environment"
27
+ require "build/rulebook"
28
+ require "build/rule"
29
+
30
+ environment = Build::Environment.new do
31
+ define Build::Rule, "copy.file" do
32
+ input :source
33
+ output :destination
34
+
35
+ apply do |parameters|
36
+ cp parameters[:source], parameters[:destination]
37
+ end
38
+ end
39
+
40
+ define Build::Rule, "compile.cpp" do
41
+ input :source
42
+ output :object
43
+
44
+ apply do |parameters|
45
+ run! "clang++", "-c", parameters[:source], "-o", parameters[:object]
46
+ end
47
+ end
48
+ end
49
+
50
+ rulebook = Build::Rulebook.for(environment.flatten)
51
+ ~~~
52
+
53
+ ### Running a Build
54
+
55
+ Use {ruby Build::Controller} to orchestrate the build graph. The controller handles dependency resolution and runs rules concurrently where possible:
56
+
57
+ ~~~ ruby
58
+ require "build/controller"
59
+
60
+ controller = Build::Controller.new do |controller|
61
+ controller.add_chain(chain, [], environment)
62
+ end
63
+
64
+ controller.run
65
+
66
+ if controller.failed?
67
+ $stderr.puts "Build failed!"
68
+ exit(1)
69
+ end
70
+ ~~~
@@ -0,0 +1,13 @@
1
+ # Automatically generated context index for Utopia::Project guides.
2
+ # Do not edit then files in this directory directly, instead edit the guides and then run `bake utopia:project:agent:context:update`.
3
+ ---
4
+ description: Build is a framework for creating task based build systems.
5
+ metadata:
6
+ documentation_uri: https://ioquatix.github.io/build/
7
+ source_code_uri: https://github.com/kurocha/build.git
8
+ funding_uri: https://github.com/sponsors/ioquatix
9
+ files:
10
+ - path: getting-started.md
11
+ title: Getting Started
12
+ description: This guide explains how to get started with `build`, a task-driven
13
+ build system similar to make.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2024, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
 
6
6
  require "fileutils"
7
7
  require "build/graph"
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2016-2019, by Samuel Williams.
4
+ # Copyright, 2016-2026, by Samuel Williams.
5
5
 
6
6
  require "build/files"
7
7
  require "build/graph"
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2015-2019, by Samuel Williams.
4
+ # Copyright, 2015-2026, by Samuel Williams.
5
5
 
6
6
  require "build/files"
7
7
  require "build/makefile"
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
 
6
6
  require "build/graph"
7
7
 
data/lib/build/name.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2015-2019, by Samuel Williams.
4
+ # Copyright, 2015-2026, by Samuel Williams.
5
5
 
6
6
  module Build
7
7
  # Represents a human-readable name with helpers for generating identifiers, target names, and macros.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
 
6
6
  require "build/graph"
7
7
 
data/lib/build/rule.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2015-2019, by Samuel Williams.
4
+ # Copyright, 2015-2026, by Samuel Williams.
5
5
 
6
6
  module Build
7
7
  # A rule is a function with a specific set of input and output parameters, which can match against a given set of specific arguments. For example, there might be several rules for compiling, but the specific rules depend on the language being compiled.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2016-2019, by Samuel Williams.
4
+ # Copyright, 2016-2026, by Samuel Williams.
5
5
 
6
6
  require "build/graph"
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2015-2019, by Samuel Williams.
4
+ # Copyright, 2015-2026, by Samuel Williams.
5
5
 
6
6
  require_relative "rule"
7
7
 
data/lib/build/task.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2016-2019, by Samuel Williams.
4
+ # Copyright, 2016-2026, by Samuel Williams.
5
5
 
6
6
  require "fileutils"
7
7
  require "build/graph"
data/lib/build/version.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2015-2024, by Samuel Williams.
4
+ # Copyright, 2015-2026, by Samuel Williams.
5
5
 
6
6
  # @namespace
7
7
  module Build
8
- VERSION = "2.7.0"
8
+ VERSION = "2.8.0"
9
9
  end
data/lib/build.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2015, by Samuel Williams.
4
+ # Copyright, 2015-2026, by Samuel Williams.
5
5
 
6
6
  require_relative "build/version"
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2015-2024, by Samuel Williams.
3
+ Copyright, 2015-2026, by Samuel Williams.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -4,30 +4,20 @@ Build is a ruby gem providing systems for building task driven build systems sim
4
4
 
5
5
  [![Development Status](https://github.com/ioquatix/build/workflows/Test/badge.svg)](https://github.com/ioquatix/build/actions?workflow=Test)
6
6
 
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- gem 'build'
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install build
20
-
21
7
  ## Usage
22
8
 
23
- Please see the [project documentation](https://ioquatix.github.io/build) for more details.
9
+ Please see the [project documentation](https://ioquatix.github.io/build/) for more details.
10
+
11
+ - [Getting Started](https://ioquatix.github.io/build/guides/getting-started/index) - This guide explains how to get started with `build`, a task-driven build system similar to make.
24
12
 
25
13
  ## Releases
26
14
 
27
- Please see the [project releases](https://ioquatix.github.io/buildreleases/index) for all releases.
15
+ Please see the [project releases](https://ioquatix.github.io/build/releases/index) for all releases.
28
16
 
29
17
  ### v2.7.0
30
18
 
19
+ - Remove logger dependency and options.
20
+
31
21
  ## Contributing
32
22
 
33
23
  We welcome contributions to this project.
@@ -38,6 +28,22 @@ We welcome contributions to this project.
38
28
  4. Push to the branch (`git push origin my-new-feature`).
39
29
  5. Create new Pull Request.
40
30
 
31
+ ### Running Tests
32
+
33
+ To run the test suite:
34
+
35
+ ``` shell
36
+ bundle exec sus
37
+ ```
38
+
39
+ ### Making Releases
40
+
41
+ To make a new release:
42
+
43
+ ``` shell
44
+ bundle exec bake gem:release:patch # or minor or major
45
+ ```
46
+
41
47
  ### Developer Certificate of Origin
42
48
 
43
49
  In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
data/releases.md CHANGED
@@ -1,3 +1,5 @@
1
1
  # Releases
2
2
 
3
3
  ## v2.7.0
4
+
5
+ - Remove logger dependency and options.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -94,30 +94,17 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.0'
97
- - !ruby/object:Gem::Dependency
98
- name: graphviz
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.0'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.0'
111
97
  executables: []
112
98
  extensions: []
113
99
  extra_rdoc_files: []
114
100
  files:
101
+ - context/getting-started.md
102
+ - context/index.yaml
115
103
  - lib/build.rb
116
104
  - lib/build/build_node.rb
117
105
  - lib/build/chain_node.rb
118
106
  - lib/build/controller.rb
119
107
  - lib/build/dependency_node.rb
120
- - lib/build/graphviz.rb
121
108
  - lib/build/name.rb
122
109
  - lib/build/provision_node.rb
123
110
  - lib/build/rule.rb
@@ -128,13 +115,12 @@ files:
128
115
  - license.md
129
116
  - readme.md
130
117
  - releases.md
131
- homepage: https://github.com/kurocha/build
132
118
  licenses:
133
119
  - MIT
134
120
  metadata:
135
- documentation_uri: https://ioquatix.github.io/build
136
- funding_uri: https://github.com/sponsors/ioquatix
121
+ documentation_uri: https://ioquatix.github.io/build/
137
122
  source_code_uri: https://github.com/kurocha/build.git
123
+ funding_uri: https://github.com/sponsors/ioquatix
138
124
  rdoc_options: []
139
125
  require_paths:
140
126
  - lib
@@ -142,14 +128,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - ">="
144
130
  - !ruby/object:Gem::Version
145
- version: '3.2'
131
+ version: '3.3'
146
132
  required_rubygems_version: !ruby/object:Gem::Requirement
147
133
  requirements:
148
134
  - - ">="
149
135
  - !ruby/object:Gem::Version
150
136
  version: '0'
151
137
  requirements: []
152
- rubygems_version: 4.0.3
138
+ rubygems_version: 4.0.6
153
139
  specification_version: 4
154
140
  summary: Build is a framework for creating task based build systems.
155
141
  test_files: []
metadata.gz.sig CHANGED
Binary file
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Released under the MIT License.
4
- # Copyright, 2015, by Samuel Williams.
5
-
6
- module Build
7
- # Generate a Graphviz graph visualisation of the build graph.
8
- # @parameter walker [Build::Graph::Walker] The completed walker containing tasks.
9
- # @returns [Graphviz::Graph] A graph object ready for rendering.
10
- def self.graph_visualisation(walker)
11
- graph = Graphviz::Graph.new("G", rankdir: "LR")
12
-
13
- walker.tasks.each do |node, task|
14
- input_nodes = []
15
- output_nodes = []
16
-
17
- task.inputs.each do |path|
18
- input_nodes << graph.add_node(path.basename)
19
- end
20
-
21
- task.outputs.each do |path|
22
- output_nodes << graph.add_node(path.basename)
23
- end
24
-
25
- if output_nodes.size == 1
26
- input_nodes.each do |input_node|
27
- edge = input_node.connect(output_nodes.first)
28
- edge.attributes[:label] = node.title
29
- end
30
- end
31
- end
32
-
33
- return graph
34
- end
35
- end