Skip to content

Commit

Permalink
Merge branch 'dev' into feature/1724-upgrade-python-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Aug 29, 2024
2 parents d5f65b8 + adf9146 commit a1275c8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: 🔗 Install wget for Windows
if: matrix.os == 'windows-latest'
Expand Down Expand Up @@ -57,6 +58,13 @@ jobs:
run: bash ./package_antares_web.sh
working-directory: scripts

- name: Add installer to package
shell: bash
run: |
pip install hatch
./package_antares_installer.sh
working-directory: scripts

- name: 📜️ Copy changelog file
run: |
cp docs/CHANGELOG.md dist/package/CHANGELOG.md
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "installer"]
path = installer
url = https://github.com/AntaresSimulatorTeam/antares-web-installer.git
1 change: 1 addition & 0 deletions installer
Submodule installer added at e7552a
26 changes: 26 additions & 0 deletions scripts/package_antares_installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Antares Desktop Installer
#
# This script must be run by ̀.github/worflows/deploy.yml`.
# It builds the installer application and stores it in the package directory.

SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
PROJECT_DIR=$(dirname -- "${SCRIPT_DIR}")
INSTALLER_DIR="${PROJECT_DIR}/installer"
DIST_DIR="${PROJECT_DIR}/dist/package"

# build package
echo "INFO: Generating the Installer..."

pushd ${INSTALLER_DIR}
if [[ "$OSTYPE" == "msys"* ]]; then
# For windows we build the GUI version
hatch run pyinstaller:build_gui AntaresWebInstaller
mv dist/AntaresWebInstaller ${DIST_DIR}
else
# For linux we build the command line version
hatch run pyinstaller:build_cli AntaresWebInstallerCLI
mv dist/AntaresWebInstallerCLI ${DIST_DIR}
fi
popd

0 comments on commit a1275c8

Please sign in to comment.