-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yml
33 lines (29 loc) · 942 Bytes
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# https://taskfile.dev
version: '3'
vars:
GREETING: Hello, World!
tasks:
pull-all:
silent: true
cmds:
- echo "Pull from root" && git checkout main && git pull origin main
- echo ""
- |
git submodule foreach --recursive '
BRANCH=$(git symbolic-ref --short HEAD || echo "main")
echo "Checking out and pulling latest changes for submodule: $name on branch $BRANCH"
git checkout $BRANCH && git pull origin $BRANCH
echo ""
'
push-all:
silent: true
cmds:
- |
git submodule foreach --recursive '
BRANCH=$(git symbolic-ref --short HEAD || echo "main")
echo "Pushing changes for submodule: $name on branch $BRANCH"
git push origin $BRANCH
echo ""
'
- echo "Pushing change for main repository"
- git push origin main