@@ -4,26 +4,33 @@ ACTION=$1
4
4
BRANCH_NAME=$2
5
5
6
6
if [ -z " $BRANCH_NAME " ]; then
7
- echo " Usage: $0 <branch-name> [start|finish|update ]"
8
- echo " start: Start new contribution"
9
- echo " finish: Restore private workflows "
7
+ echo " Usage: $0 <branch-name> [start|finish]"
8
+ echo " start: Start new contribution"
9
+ echo " finish: Restore upstream diff "
10
10
exit 1
11
11
fi
12
12
13
13
case $ACTION in
14
14
" start" )
15
15
echo " 🔄 Synchronisation with upstream..."
16
16
git checkout main
17
+ git fetch origin
17
18
18
19
git fetch upstream
19
- git diff upstream/main -- .github/workflows/ > private-workflows .patch
20
+ git diff upstream/main > diff-upstream .patch
20
21
21
- echo " 🗑️ Deleting private workflows before contrib..."
22
- git apply -R private-workflows .patch
23
- echo " ✅ Private workflows deleted"
22
+ echo " 🗑️ Deleting upstream diff before contrib..."
23
+ git apply -R diff-upstream .patch
24
+ echo " ✅ Upstream diff deleted"
24
25
25
26
echo " 🌿 Creating branch $BRANCH_NAME ..."
26
27
git checkout -b " $BRANCH_NAME "
28
+
29
+ echo " 🌿 Prepare contrib by deleting diff"
30
+ git add -A
31
+ git reset HEAD diff-upstream.patch
32
+ git commit -m " refactor(contrib): prepare contribution"
33
+ git push origin " $BRANCH_NAME "
27
34
28
35
echo " ✅ Ready for contrib !"
29
36
;;
@@ -32,14 +39,14 @@ case $ACTION in
32
39
echo " 🔄 Return to main..."
33
40
git checkout main
34
41
35
- echo " 🔧 Restore private workflows..."
36
- git apply private-workflows .patch
42
+ echo " 🔧 Restore upstream diff workflows..."
43
+ git apply diff-upstream .patch
37
44
38
45
echo " ✅ Ready !"
39
46
;;
40
47
41
48
* )
42
- echo " Action inconnue : $ACTION "
43
- echo " Utilisez: start or finish"
49
+ echo " Unkown action : $ACTION "
50
+ echo " Use start or finish"
44
51
;;
45
52
esac
0 commit comments