From f979d470adc755a75a82f0adb78265d623626cdf Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 28 Mar 2018 18:49:25 +0200 Subject: [PATCH] Add push and status scripts for submodules --- dev/push.sh | 13 +++++++++++++ dev/status.sh | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 dev/push.sh create mode 100644 dev/status.sh diff --git a/dev/push.sh b/dev/push.sh new file mode 100644 index 0000000..258d60f --- /dev/null +++ b/dev/push.sh @@ -0,0 +1,13 @@ +#!/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")"/../../ + +git submodule foreach --recursive 'git push' diff --git a/dev/status.sh b/dev/status.sh new file mode 100644 index 0000000..a3f6298 --- /dev/null +++ b/dev/status.sh @@ -0,0 +1,13 @@ +#!/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")"/../../ + +git submodule foreach --recursive 'git status' -- 2.39.5