source_install 1.0.1 → 1.1.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 +4 -4
- data/lib/source_install.rb +15 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0eb0653df730edc3207daab89e62f9393e1101d2842ff066cf28b6fb183c015c
|
4
|
+
data.tar.gz: 92b9c77b8ff26f28f2afe8a25cda5b1b3a281ade77de02eba39b00063cc6912b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02cca226b237e8fb00430486a6e9c1af8af22e90d36704c533c18ee03e0f77f6b029593a0326377ec7959ed7a05db210de5d76fecbfd405e4b2e1d9708eb6e02
|
7
|
+
data.tar.gz: 732d67b245660f9736dbc985614723864c6037a52fc43ecc26d3b069c364536588613c7128872648c9e25a81ee76e054376c2bfbe837e2c0b992e96f45311104
|
data/lib/source_install.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
module Source
|
5
5
|
# This module implements helpers that are used for resources
|
6
6
|
module Install
|
7
|
-
VERSION = '1.0
|
7
|
+
VERSION = '1.1.0'
|
8
8
|
|
9
9
|
# Hooks for install
|
10
10
|
|
@@ -53,8 +53,18 @@ e.g. "bin/my_app"')
|
|
53
53
|
raise NotImplementedError('Client must define the command for installation, e.g. "make install"')
|
54
54
|
end
|
55
55
|
|
56
|
+
# Optional hooks for install
|
57
|
+
|
56
58
|
def post_install_logic(_new_resource)
|
57
|
-
|
59
|
+
# Client may define logic to run after installation, for example for creating symlinks
|
60
|
+
end
|
61
|
+
|
62
|
+
def config_creates_file(_new_resource)
|
63
|
+
# A relative path to a file created by configuration
|
64
|
+
# If the client defines a config_creates_file, then the content of that file will be used to signal rebuild
|
65
|
+
# Otherwise, a checksum is taken of the entire build directory
|
66
|
+
# A file is less robust for signaling rebuild when config changes, but cleaner for nasty in-source builds
|
67
|
+
return nil
|
58
68
|
end
|
59
69
|
|
60
70
|
# Common install code
|
@@ -226,8 +236,10 @@ e.g. "bin/my_app"')
|
|
226
236
|
end
|
227
237
|
|
228
238
|
def check_build_directory(build_directory, new_resource)
|
239
|
+
creates_file = config_creates_file(new_resource)
|
229
240
|
checksum_file 'Source Checksum' do
|
230
|
-
source_path build_directory
|
241
|
+
source_path File.join(build_directory, creates_file) if creates_file
|
242
|
+
source_path build_directory unless creates_file
|
231
243
|
target_path "/var/chef/cache/#{base_name(new_resource).downcase}-#{new_resource.version}-src-checksum"
|
232
244
|
end
|
233
245
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: source_install
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UA OIT Systems Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|