From cbecf724ccaf33972036bae9ac5e41acd20510eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Sat, 7 Jan 2023 10:38:45 +0100 Subject: ci: Update submodule in flathub repo Source of the update-index command: https://stackoverflow.com/q/33514642 --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7280ddc78..cad80d380 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,10 +134,14 @@ deploy-flatpak: - eval $(ssh-agent -s) - .ci/prepare_git.sh github.com "${FLATHUB_DEPLOY_KEY}" script: + # extract the current commit hash of the shared-modules submodule + - submodule_commit=$(git submodule status flatpak/shared-modules | cut -c 2-41) - git clone git@github.com:flathub/org.gajim.Gajim.git - cd org.gajim.Gajim - mv ../flatpak/org.gajim.Gajim.yaml org.gajim.Gajim.yaml - mv ../flatpak/app-overrides.json app-overrides.json + # point the shared-modules submodule to the new commit, without fetching the repository + - git update-index --cacheinfo 160000,${submodule_commit},shared-modules - git diff - git add --all - git commit -m "$CI_COMMIT_TAG" -- cgit v1.2.3