Execute git-submodule in order to check for missing .gitmodules
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

This commit is contained in:
nemunaire 2023-05-01 21:36:30 +00:00
parent 9de9906f3e
commit a5eccab561
1 changed files with 1 additions and 0 deletions

View File

@ -82,6 +82,7 @@ steps:
- wget -O ~/.ssh/allowed_signers "https://lessons.nemunai.re/api/users/$${LOGIN}/allowed_signers" && git config --global gpg.ssh.allowedSignersFile "~/.ssh/allowed_signers" || true
- set -o pipefail; git ls-remote --tags "${REPO_URL}" | grep "refs/tags/${REPO_TAG}" | tail -n 1 | sed 's@/@ @;s@/@ @;s@\^{}$@@' | awk '{ print "Using tag " $$4 }' || { echo "No tag found (was looking for ${REPO_TAG})" >&2; exit 1; }
- git clone --depth 1 --recurse-submodules --branch $$(git ls-remote --tags "${REPO_URL}" | grep "refs/tags/${REPO_TAG}" | tail -n 1 | sed 's@/@ @;s@/@ @;s@\^{}$@@' | awk '{ print $$4 }') ${REPO_URL} "/work/${LOGIN}"
- git -C "/work/${LOGIN}" submodule
- git -C "/work/${LOGIN}" verify-tag --raw $$(git ls-remote --tags "${REPO_URL}" | grep "refs/tags/${REPO_TAG}" | tail -n 1 | sed 's@/@ @;s@/@ @;s@\^{}$@@' | awk '{ print $$4 }') || { echo "Tag verification failed" >&2; [ -n "${TAG_SIG_OPTIONAL}" ] || exit 2; }
- tar cJf "/work/rendu-${LOGIN}.tar.xz" --exclude-vcs -C /work "${LOGIN}/"
- "echo -e '{\"filename\": \"rendu-${LOGIN}.tar.xz\", \"size\": '$$(du -s ${LOGIN}/ | awk \'{ print $1 }\')', \"date_now\": \"'$$(date -Iseconds)'\", \"date\": \"'$$(git -C \'/work/${LOGIN}\' log -1 --format=%cd --date=iso-strict)'\", \"tag\": \"'$(git -C \'/work/${LOGIN}\' describe --tags)'\", \"commit\": \"'$$(git -C \'/work/${LOGIN}\' rev-parse HEAD)'\"}' >> /work/rendu-${LOGIN}.metadata"