Could Release-CLI create a release including submodule files?

Summary

Releasing works except when a repository has submodules. Those appear always empty in the release directory, it seems as they are not archived. I believe this is an important feature as a lot of projects rely on existing and stable repositories and git offers the possibility to interlink them via the git submodule commands.

Steps to reproduce

  • Create a new repository with some dummy files in it
  • Add a submodule (perhaps pointing to another existing gitlab repository), e.g. git submodule add
  • A .gitmodules file is generated in the parent repository.
  • Run the latest implementation of the release-cli on this parent repository. (it requires a .gitlab-ci.yml file set-up accordingly)
  • Create tag -> that launches the CI routine
  • This results into a release (under Project Overview -> Release) with all the parent repo files in it, and all the submodule folders empty -> the submodule function is not archived.

Example Project

One can check for example this project: https://gitlab.kitware.com/paraview/paraview

It is equipped with several submodules (see .gitmodules), however, the multiple releases under Project Overview, show that all contents of the submodule folders appear empty.

What is the current bug behavior?

The current GitLab web interface and Release-CLI don't seem to archive the content of submodules when creating a release package. Only the parent repo files are dropped there.

What is the expected correct behavior?

I would expect that a release would archive everything in the repository, including the submodules (provided that the link or submodule repository exists). In that matter, the release is completely self-contained as the main developers intended without having to download separately these extra packages.

there are some solutions out there, that allow you to package everything by using git based scripts (e.g

https://github.com/fabacab/git-archive-all.sh/blob/master/git-archive-all.sh

But without dropping the release in "Project Overview -> Releases"

However, I would expect this feature to be operational within the web interface too or in any ci pipeline that is dealing with releases. Specially for those users who are only interested in picking the release package without having to deal with git commands.

Output of checks

This bug also occurs in GitLab.com when doing a manual release!

Possible fixes

Edited by Jaime Martinez