slugbuilder 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +2 -0
- data/lib/slugbuilder/builder.rb +9 -0
- data/lib/slugbuilder/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06dc50b7ddf97d49f958e3a06e4129a6b049caed
|
4
|
+
data.tar.gz: c3a927ef28e60b0fa83d9d897478519b4806362b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f86f5ad1ce6ad981cc2a8dd0b8f9d0911501e162ff7ad18915c6723bef994a62aee344cc7ca1e705981adff23ce9a6d79c1e04565c784072ed39ed30e71266ab
|
7
|
+
data.tar.gz: 01a9a03760f92205a8a372dd99f6317476b47574c720fc71bc902068b358319aebac5b164d30d73c37fdd3b012cd40520cb720fa5b455d8891db3a293f3ef8eb
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.3.0 (2017-3-7)
|
4
|
+
|
5
|
+
Added:
|
6
|
+
|
7
|
+
- Run `bin/pre-compile` before any buildpacks are run (if it exists) and run `bin/post-compile` after all buildpacks are run (if it exists). These files are contained in the project being built. [e2b5295](../../commit/e2b5295)
|
8
|
+
|
3
9
|
## 1.2.0 (2017-2-1)
|
4
10
|
|
5
11
|
Fixed:
|
data/README.md
CHANGED
@@ -78,6 +78,8 @@ sb.build(env: {}) do |args|
|
|
78
78
|
end
|
79
79
|
```
|
80
80
|
|
81
|
+
You can optionally define a `pre-compile` or `post-compile` script in your application's `bin` folder (eg. `bin/pre-compile`). The `pre-compile` script will run before any buildpacks are run, and the `post-compile` script will run after all of the buildpacks are run. The script should be executable (run `chmod +x` on the script files).
|
82
|
+
|
81
83
|
## API
|
82
84
|
|
83
85
|
### Builder#initialize(repo:, git_ref:, &block)
|
data/lib/slugbuilder/builder.rb
CHANGED
@@ -88,7 +88,9 @@ module Slugbuilder
|
|
88
88
|
@build_time = realtime do
|
89
89
|
set_environment
|
90
90
|
buildpacks = fetch_buildpacks
|
91
|
+
run_hook('pre-compile')
|
91
92
|
run_buildpacks(buildpacks)
|
93
|
+
run_hook('post-compile')
|
92
94
|
@slug_time = realtime { build_slug }
|
93
95
|
slug_size
|
94
96
|
print_workers
|
@@ -191,6 +193,13 @@ module Slugbuilder
|
|
191
193
|
@buildpacks
|
192
194
|
end
|
193
195
|
|
196
|
+
def run_hook(hook_name)
|
197
|
+
Dir.chdir(@build_dir) do
|
198
|
+
script = "#{@build_dir}/bin/#{hook_name}"
|
199
|
+
run(script) if File.exists?(script)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
194
203
|
def run_buildpacks(buildpacks)
|
195
204
|
@compile_time = 0
|
196
205
|
|
data/lib/slugbuilder/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slugbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Panoply Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.6.10
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Build Heroku-like slugs
|