Skip to content

Commit

Permalink
Make update_submodules a little bit more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed Jun 13, 2018
1 parent 6f4c13a commit a0efd41
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions update_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
timestamp=$(date +%s)

for version in 1.04 1.05 2.01 2.02 2.03; do
# Checkout to the specified version for the SSOT directory
git checkout version-$version

# Pull the latest code from origin for this version (i.e. Git branch) of the SSOT directory
git pull origin version-$version
# fetch the latest version from the remote
git fetch origin version-$version

# Check out a new branch to get around branch protection
git checkout -b update-submodules-$timestamp-$version
# Checkout to the specified version for the SSOT directory
git checkout --force origin/version-$version

# Discard local changes to submodules
# See: https://stackoverflow.com/a/27415757/2323348
git submodule deinit -f .
git submodule update --init

# Check out a new branch to get around branch protection
git checkout -b update-submodules-$timestamp-$version

# Pull the latest versions of submodules
git submodule update --remote

Expand Down

0 comments on commit a0efd41

Please sign in to comment.