Skip to content

Commit f8cf47e

Browse files
committed
Remove s2i_core_env_init_hook
s2i-core-hooks only defined one function, s2i_core_env_init_hook This was only called by s2i_core_env_init in s2i-core (it overrides an empty definition of the same function name in s2i-core) Fold the content of the function into s2i_core_env_init and remove the s2i-core-hooks file Remove includes of it from s2i/assemble and run (which didn't call the function anyway) Signed-off-by: Jonathan Dowland <[email protected]>
1 parent d5a13f0 commit f8cf47e

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

modules/s2i/artifacts/opt/jboss/container/java/s2i/s2i-core

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ function s2i_core_init() {
1919
}
2020

2121
function s2i_core_env_init() {
22-
# initialize core s2i environmet variables
23-
s2i_core_env_init_hook
22+
# initialize core s2i environment variables
23+
S2I_TARGET_DATA_DIR="${S2I_TARGET_DATA_DIR:-${JAVA_DATA_DIR:-/deployments/data}}"
2424
S2I_DESTINATION_DIR="${S2I_DESTINATION_DIR:-/tmp}"
2525
S2I_ARTIFACTS_DIR="${S2I_DESTINATION_DIR}/artifacts"
2626
S2I_SOURCE_DIR="${S2I_DESTINATION_DIR}/src"
@@ -35,12 +35,6 @@ function s2i_core_env_init() {
3535
S2I_DELETE_SOURCE="${S2I_DELETE_SOURCE:-true}"
3636
}
3737

38-
# extensions may override this method to initialize environment variables
39-
# to suit their own needs.
40-
function s2i_core_env_init_hook() {
41-
:
42-
}
43-
4438
# Copy files from a source path to a destination path
4539
# Do not attempt to change metadata of the destination path, which we
4640
# may not own

modules/s2i/artifacts/opt/jboss/container/java/s2i/s2i-core-hooks

Lines changed: 0 additions & 7 deletions
This file was deleted.

modules/s2i/artifacts/usr/libexec/s2i/assemble

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ set -e
55
source "${JBOSS_CONTAINER_UTIL_LOGGING_MODULE}/logging.sh"
66
source "${JBOSS_CONTAINER_MAVEN_S2I_MODULE}/maven-s2i"
77

8-
# include our s2i_core_*() overrides/extensions
9-
source "${JBOSS_CONTAINER_JAVA_S2I_MODULE}/s2i-core-hooks"
10-
118
# inject our overridden maven_s2i_*() functions
129
source "${JBOSS_CONTAINER_JAVA_S2I_MODULE}/maven-s2i-overrides"
1310

modules/s2i/artifacts/usr/libexec/s2i/run

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
args="$*"
55

66
source "${JBOSS_CONTAINER_UTIL_LOGGING_MODULE}/logging.sh"
7-
source "$JBOSS_CONTAINER_JAVA_S2I_MODULE}/s2i-core"
8-
# include our s2i_core_*() overrides/extensions
9-
source "${JBOSS_CONTAINER_JAVA_S2I_MODULE}/s2i-core-hooks"
7+
source "${JBOSS_CONTAINER_JAVA_S2I_MODULE}/s2i-core"
108

119
# Global S2I variable setup
1210
s2i_core_env_init

0 commit comments

Comments
 (0)