continuous integration - Xcode Bots do not update git submodules to specified commit -
my xcode bot using outdated version of repo's submodules.
it builds old submodule code despite submodule being updated new version in commit history of parent app.
- parent repo uses submodule v1.0.
- parent repo updates submodule v2.0 , commits subproject commit github.
- the "on commit" xcode bot run new commit automatically.
- parent app uploaded testflight.
- testflight build contains correct v2.0 submodule commit (the last commit parent repo).
- however testflight build contains outdated submodule v1.0 code.
i thought going crazy when bugs reproducible on testflight build despite being "fixed" in submodule , local builds.
it turns out xcode bots not pull specified submodule commit.
a simpler solution problem doesn't require server having credecentials git remotes - add pre-integration script bot:
#!/bin/sh # enumerates each submodule check out desired commit. # needed because xcode bots reason prefers check out # branch head, may result in wrong commit. cd "$xcs_primary_repo_dir" git submodule foreach --recursive 'git checkout $sha1'
it recursively enumerates submodules , checks out commit expected parent repo.
Comments
Post a Comment