mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
cleanup some packaging stuff
This commit is contained in:
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@@ -17,7 +17,8 @@ jobs:
|
||||
run: |
|
||||
echo "Reading version from file:"
|
||||
cat packaging/ATCS_latest
|
||||
VERSION=$(cat packaging/ATCS_latest)
|
||||
echo ""
|
||||
VERSION=$(tr -d '[:space:]' < "packaging/ATCS_latest")
|
||||
echo "Processed version: $VERSION"
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "Environment variable set to: $VERSION"
|
||||
@@ -26,7 +27,7 @@ jobs:
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Build JAR
|
||||
shell: bash
|
||||
@@ -41,8 +42,6 @@ jobs:
|
||||
|
||||
- name: Install NSIS
|
||||
uses: joncloud/makensis-action@v4
|
||||
env:
|
||||
VERSION: ${{ env.VERSION }}
|
||||
with:
|
||||
script-file: packaging/Windows/ATCS_Installer.nsi
|
||||
arguments: /DVERSION="${{ env.VERSION }}"
|
||||
|
||||
@@ -29,7 +29,7 @@ EXTRA_SOURCE_DIRS=(
|
||||
"siphash-zackehh/src/main/java"
|
||||
)
|
||||
|
||||
# --- Libraries to include (from IntelliJ artifact definition) ---
|
||||
# --- Libraries to include ---
|
||||
LIBRARIES=(
|
||||
"AndorsTrainer_v0.1.5.jar"
|
||||
"bsh-2.0b4.jar"
|
||||
@@ -44,7 +44,7 @@ LIBRARIES=(
|
||||
|
||||
# --- Get version ---
|
||||
echo "Getting version"
|
||||
VERSION=$(cat "${VERSION_FILE}")
|
||||
VERSION=$(tr -d '[:space:]' < "${VERSION_FILE}")
|
||||
echo "Got version ${VERSION}"
|
||||
|
||||
# --- Prepare temporary directory ---
|
||||
@@ -62,7 +62,7 @@ done
|
||||
|
||||
# --- Set ClassPath ---
|
||||
echo "Getting source files"
|
||||
# Find all java files in source directories and compile them
|
||||
# Find all java files in source directories
|
||||
SOURCE_FILES=$(find "${SOURCE_BASE_DIR}" "${EXTRA_SOURCE_DIRS[@]/#/${ATCS_SOURCE_DIR}/}" -name "*.java" -print)
|
||||
#echo "SourceFiles: ${SOURCE_FILES}"
|
||||
echo ""
|
||||
@@ -70,6 +70,8 @@ echo ""
|
||||
# --- Build Java classes ---
|
||||
echo 'Building java classes'
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
# (we need word splitting here to pass multiple files)
|
||||
javac -cp "${TEMP_DIR}" -d "${TEMP_DIR}" ${SOURCE_FILES}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Compilation failed. Please check errors above."
|
||||
@@ -114,7 +116,10 @@ else
|
||||
# Use zip command on Linux
|
||||
zip -r "ATCS_${VERSION}.zip" common/* # archive the 'common' folder which now contains the JAR and libs
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Archive creation failed."
|
||||
exit 1
|
||||
fi
|
||||
echo "Created archive at ${PACKAGING_DIR}/ATCS_${VERSION}.zip"
|
||||
cd "${PACKAGING_DIR}" || exit
|
||||
|
||||
echo "Script finished."
|
||||
|
||||
Reference in New Issue
Block a user