From: Guillaume Pellerin Date: Tue, 12 Jun 2018 10:56:19 +0000 (+0200) Subject: Add prod/push.sh X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a237230ef37f393fd52d38c73db1c2d989c7acd7;p=docker-django-scripts.git Add prod/push.sh --- diff --git a/prod/push.sh b/prod/push.sh new file mode 100755 index 0000000..454fe4a --- /dev/null +++ b/prod/push.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# The script detect the right main project branch, then update the submodule function of branch-[mainProjectBranch] +# For example, if you define these variables in .gitmodules : +# - branch-dev +# - branch-master +# If you are on dev branch in main project, the script will update submodule functions of branch-dev you've defined +# In main project, if you are in another branch than master or dev, it will take by default dev branch +# If you don't define any branches for you submodule, the script will update from master + +cd "$(dirname "$0")"/../../ + +bin/misc/git_switch_urls.sh --ssh +git push +git submodule foreach --recursive 'git push' +bin/misc/git_switch_urls.sh --https