Skip to content

Commit b2812e6

Browse files
committed
#262: Refactor build script for improved readability and maintenance.
1 parent bfefa67 commit b2812e6

File tree

2 files changed

+28
-22
lines changed

2 files changed

+28
-22
lines changed

src/main/resources/org/eolang/hone/scaffolding/entry.sh

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ if [ -n "${EXTRA}" ]; then
8282
fi
8383
fi
8484

85-
echo "Using the following rules: ${RULES}"
85+
printf 'Using Java: %s' "$(java --version | head -1)"
86+
87+
printf 'Using Maven: %s' "$(mvn --version | head -1)"
88+
89+
printf 'Using the following rules:\n\t%s' "$(echo "${RULES}" | gsed 's/ /\n\t/g')"
8690

8791
declare -a jeo_opts=()
8892
if [ -n "${INCLUDES}" ]; then
@@ -94,23 +98,25 @@ if [ -n "${EXCLUDES}" ]; then
9498
jeo_opts+=("-Djeo.assemble.excludes=${EXCLUDES}")
9599
fi
96100

97-
set -x
98-
mvn "${opts[@]}" \
99-
jeo:disassemble \
100-
"-Djeo.disassemble.sourcesDir=${TARGET}/${CLASSES}" \
101-
"-Djeo.disassemble.outputDir=${TARGET}/generated-sources/jeo-disassemble" \
102-
"${jeo_opts[@]}" \
103-
exec:exec \
104-
"-Dexec.phino.script=${SELF}/normalize.sh" \
105-
"-Dexec.phino.verbose=${VERBOSE}" \
106-
"-Dexec.phino.rules=${RULES}" \
107-
"-Dexec.phino.xmir-in=${TARGET}/generated-sources/jeo-disassemble" \
108-
"-Dexec.phino.from=${TARGET}/generated-sources/phi" \
109-
"-Dexec.phino.to=${TARGET}/generated-sources/phi-optimized" \
110-
"-Dexec.phino.xmir-out=${TARGET}/generated-sources/unphi" \
111-
"-Dexec.phino.small-steps=${SMALL_STEPS}" \
112-
"-Dexec.phino.max-depth=${MAX_DEPTH}" \
113-
jeo:assemble \
114-
"-Djeo.assemble.sourcesDir=${TARGET}/generated-sources/unphi" \
115-
"-Djeo.assemble.outputDir=${TARGET}/${CLASSES}" \
116-
"${jeo_opts[@]}"
101+
(
102+
set -x
103+
mvn "${opts[@]}" \
104+
jeo:disassemble \
105+
"-Djeo.disassemble.sourcesDir=${TARGET}/${CLASSES}" \
106+
"-Djeo.disassemble.outputDir=${TARGET}/generated-sources/jeo-disassemble" \
107+
"${jeo_opts[@]}" \
108+
exec:exec \
109+
"-Dexec.phino.script=${SELF}/normalize.sh" \
110+
"-Dexec.phino.verbose=${VERBOSE}" \
111+
"-Dexec.phino.rules=${RULES}" \
112+
"-Dexec.phino.xmir-in=${TARGET}/generated-sources/jeo-disassemble" \
113+
"-Dexec.phino.from=${TARGET}/generated-sources/phi" \
114+
"-Dexec.phino.to=${TARGET}/generated-sources/phi-optimized" \
115+
"-Dexec.phino.xmir-out=${TARGET}/generated-sources/unphi" \
116+
"-Dexec.phino.small-steps=${SMALL_STEPS}" \
117+
"-Dexec.phino.max-depth=${MAX_DEPTH}" \
118+
jeo:assemble \
119+
"-Djeo.assemble.sourcesDir=${TARGET}/generated-sources/unphi" \
120+
"-Djeo.assemble.outputDir=${TARGET}/${CLASSES}" \
121+
"${jeo_opts[@]}"
122+
)

src/main/resources/org/eolang/hone/scaffolding/in-docker-pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<name>hone</name>
1313
<properties>
1414
<eo.version>0.58.0</eo.version>
15-
<jeo.version>0.13.4</jeo.version>
15+
<jeo.version>0.13.6</jeo.version>
1616
</properties>
1717
<build>
1818
<pluginManagement>

0 commit comments

Comments
 (0)