-
Brent Huisman authored
* Create a script that generates `diff.log` if git submodules have tags more recent that the commit they're currently at. * A Github Action runs this script monthly. * _If_ updates found, Github Action creates an Issue like so: https://github.com/brenthuisman/arbor/issues/9 * Actually updating the git submodule and Spack file are still manual First step in addressing #1731
Unverifiedeafee4da
submodule-diff.sh 772 B
#!/usr/bin/env bash
# Check any git submodule remotes for updates, and print difference with current Arbor repo state to `diff.log`
git submodule foreach 'git describe HEAD --tags' | tee current_state_of_git_submodules_in_arbor_repo.log
git submodule foreach 'git fetch'
git submodule foreach 'git describe `git log --branches -1 --pretty=format:"%H"` --tags --abbrev=0' | tee upstream_state_of_git_submodules.log
if diff current_state_of_git_submodules_in_arbor_repo.log upstream_state_of_git_submodules.log ; then
echo "No submodule updates found"
else
diff current_state_of_git_submodules_in_arbor_repo.log upstream_state_of_git_submodules.log -U 10000 > diff.log
fi
rm current_state_of_git_submodules_in_arbor_repo.log
rm upstream_state_of_git_submodules.log