Skip to content

Commit ea5b52f

Browse files
Staging Timestamp Framework
Created staging timestamp framework.
1 parent 8df878e commit ea5b52f

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require 'java_buildpack/framework'
2+
3+
module JavaBuildpack::Framework
4+
5+
# Adds a system property containing a timestamp of when the application was staged.
6+
class StagingTimestamp < JavaBuildpack::Component::BaseComponent
7+
def initialize(context)
8+
super(context)
9+
end
10+
11+
def detect
12+
'staging-timestamp'
13+
end
14+
15+
def compile
16+
end
17+
18+
def release
19+
@droplet.java_opts.add_system_property('staging.timestamp', "'#{Time.now}'")
20+
end
21+
end
22+
end

0 commit comments

Comments
 (0)