Skip to content

Commit 2efd9b8

Browse files
committed
build fixes
1 parent cb2f30b commit 2efd9b8

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,46 +60,51 @@ jobs:
6060
- name: Build project (skip tests + javadoc)
6161
run: mvn -U clean install -DskipTests -Dmaven.javadoc.skip=true
6262

63+
# --- keep this step (populate) as-is ---
6364
- name: Populate libs from hm-apps deps
6465
run: |
6566
set -euxo pipefail
6667
TMPLIBS=./extras/export/libs
6768
mkdir -p "${TMPLIBS}"
6869
69-
# Copy hm-apps RUNTIME dependencies into extras/export/libs
70+
# Copy hm-apps runtime deps
7071
mvn -q -pl :hm-apps -am dependency:copy-dependencies \
7172
-DoutputDirectory="${TMPLIBS}" \
7273
-DincludeScope=runtime \
7374
-DexcludeClassifiers=sources,javadoc
7475
75-
# Add the app jar itself
76+
# Copy the app jar itself (no sources jar)
7677
cp ./apps/target/hm-apps-*.jar "${TMPLIBS}"
77-
# (don’t ship sources in runtime bundle)
7878
rm -f "${TMPLIBS}"/*-sources.jar || true
79+
rm -f "${TMPLIBS}"/junit*.jar "${TMPLIBS}"/log4j-*.jar || true
7980
81+
# --- FIXED assemble step ---
8082
- name: Assemble tar.gz bundle
8183
run: |
8284
set -euxo pipefail
83-
VERSION="${{ steps.ver.outputs.VERSION }}"
85+
VERSION="$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version)"
8486
TMPLIBS="./extras/export/libs"
8587
DEPLOY="./extras/deploy"
8688
RELEASE_DIR="${DEPLOY}/hortonmachine_${VERSION}"
8789
88-
rm -rf "${TMPLIBS}" "${DEPLOY}/libs" "${RELEASE_DIR}" "${DEPLOY}/hortonmachine_${VERSION}.tar.gz"
90+
# Do NOT delete ${TMPLIBS} here
91+
rm -rf "${DEPLOY}/libs" "${RELEASE_DIR}" "${DEPLOY}/hortonmachine_${VERSION}.tar.gz"
8992
mkdir -p "${RELEASE_DIR}"
9093
91-
cp ./apps/target/hm-apps-*.jar "${TMPLIBS}"
92-
93-
rm -f ${TMPLIBS}/junit*.jar || true
94-
rm -f ${TMPLIBS}/log4j-*.jar || true
95-
rm -f ${TMPLIBS}/*-sources.jar || true
96-
94+
# Move populated libs into the release dir
9795
mv "${TMPLIBS}" "${RELEASE_DIR}/libs"
9896
97+
# Copy deploy assets
9998
cp -rv ${DEPLOY}/*.sh ${DEPLOY}/*.exe ${DEPLOY}/*.bat ${DEPLOY}/imgs ${DEPLOY}/natives ${DEPLOY}/quiet-logging.properties "${RELEASE_DIR}"
10099
100+
# Tar it up
101101
tar -C "${DEPLOY}" -zcvf "${DEPLOY}/hortonmachine_${VERSION}.tar.gz" "hortonmachine_${VERSION}"
102102
103+
# (Optional) keep a copy of libs next to the tarball, like your local script
104+
mv "${RELEASE_DIR}/libs" "${DEPLOY}/"
105+
rm -rf "${RELEASE_DIR}"
106+
107+
103108
- name: Upload bundle artifact
104109
uses: actions/upload-artifact@v4
105110
with:

0 commit comments

Comments
 (0)