Skip to content

Commit

Permalink
must provide branch name when building flatpak bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
akohlmey committed Aug 2, 2024
1 parent 51e7e91 commit b0bc154
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/lammps-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,13 @@ find_program(FLATPAK_COMMAND flatpak DOC "Path to flatpak command")
find_program(FLATPAK_BUILDER flatpak-builder DOC "Path to flatpak-builder command")
if(FLATPAK_COMMAND AND FLATPAK_BUILDER)
file(STRINGS ${LAMMPS_DIR}/src/version.h line REGEX LAMMPS_VERSION)
string(REGEX REPLACE "#define LAMMPS_VERSION \"([0-9]+) ([A-Za-z][A-Za-z][A-Za-z])[A-Za-z]* ([0-9]+)\"" "\\1\\2\\3" LAMMPS_RELEASE "${line}")
string(REGEX REPLACE "#define LAMMPS_VERSION \"([0-9]+) ([A-Za-z][A-Za-z][A-Za-z])[A-Za-z]* ([0-9]+)\""
"\\1\\2\\3" LAMMPS_RELEASE "${line}")
add_custom_target(flatpak
COMMAND ${FLATPAK_BUILDER} --force-clean --default-branch=${LAMMPS_RELEASE} --verbose --ccache --repo=repo --user --install-deps-from=flathub flatpak-build ${LAMMPS_DIR}/tools/lammps-gui/org.lammps.lammps-gui.yml
COMMAND ${FLATPAK_BUILDER} --force-clean --verbose --ccache --repo=repo --user --default-branch=${LAMMPS_RELEASE}
--install-deps-from=flathub flatpak-build ${LAMMPS_DIR}/tools/lammps-gui/org.lammps.lammps-gui.yml
COMMAND ${FLATPAK_COMMAND} build-bundle --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo --verbose
repo LAMMPS_GUI-Linux-amd64.flatpak org.lammps.lammps-gui
repo LAMMPS_GUI-Linux-amd64.flatpak org.lammps.lammps-gui ${LAMMPS_RELEASE}
COMMENT "Create Flatpak bundle file of LAMMPS-GUI and LAMMPS"
BYPRODUCT LAMMPS-Linux-amd64.flatpak
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
Expand Down

0 comments on commit b0bc154

Please sign in to comment.