-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_godot_godex.sh
32 lines (28 loc) · 1.04 KB
/
update_godot_godex.sh
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
#!/usr/bin/env bash
set -e
git stash
echo -e "Checkout remotes"
git remote rm godot-ecs || true
git remote add godot-ecs https://github.com/GodotECS/godot
git remote set-url --push godot-ecs git@github.com:GodotECS/godot
git fetch godot-ecs
git remote rm godotengine || true
git remote add godotengine https://github.com/godotengine/godot
git remote set-url --push godotengine https://example.com
git fetch godotengine
echo -e "Work"
export ORIGINAL_BRANCH=ecs-scripts-main
export MERGE_REMOTE=godot-ecs
export MERGE_BRANCH=ecs-main
git checkout $ORIGINAL_BRANCH --force
git branch -D $MERGE_BRANCH || true
chmod +x ./thirdparty/git-assembler
./thirdparty/git-assembler --assemble --verbose --recreate
git checkout $MERGE_BRANCH -f
export MERGE_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
export MERGE_TAG=$(echo GodotECS.$MERGE_DATE | tr ':' ' ' | tr -d ' \t\n\r')
git tag -a $MERGE_TAG -m "Commited at $MERGE_DATE."
git push $MERGE_REMOTE $MERGE_TAG
git push $MERGE_REMOTE $MERGE_BRANCH -f
git checkout $ORIGINAL_BRANCH --force
git branch -D $MERGE_BRANCH || true