0

I have git repository with a submodule included. However, whenever I made a commit in the submodule it is not impacted on Travis.

It is always executed on an old version of the submodule. This is what I get (hiding real data):

git submodule update --init --recursive
Submodule 'mysubmodule' (https://github.com/xxxxx/myproject.git) registered for path 'somepath'
Cloning into '/home/travis/build/somepath'...
Submodule path 'somepath': checked out '01234567890abcdef':

Where 01234567890abcdef is an old commit, it is not the last one pushed.

coder
  • 8,346
  • 16
  • 39
  • 53
Ratmil
  • 117
  • 8
  • Possible duplicate of [how exactly does git submodule work](https://stackoverflow.com/questions/12078365/how-exactly-does-git-submodule-work) – phd Jul 04 '18 at 12:57

1 Answers1

2

Superprojects record the exact commit to check out in the submodule.

If you want your superproject to be built based on a newer submodule commit, you must therefore update the superproject. Adding new commits to the submodule does not affect the superproject; only adding new commits to the superproject can affect the superproject.

torek
  • 448,244
  • 59
  • 642
  • 775