Skip to content

Commit

Permalink
Merge branch 'main' into storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
iva2k committed Jul 19, 2024
2 parents 60e624a + f38f441 commit cc95297
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
14 changes: 9 additions & 5 deletions scripts/git-merge_main-to-all-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ SEP1="$(printf "%100s\r" "" | tr ' ' '#')"
SEP2="$(printf "%100s\r" "" | tr ' ' '=')"
# SEP3="$(printf "%100s\r" "" | tr ' ' '-')"

outputs=()
errors=()
tms_real=()
branches_done=()
# Use export to make them available to child processes (so we can use sub-processes)
export outputs=()
export errors=()
export tms_real=()
export branches_done=()
function backup_state() {
if [ -f "$STATE_FILE" ]; then
[ -f "$STATE_FILE_BACKUP" ] && rm "$STATE_FILE_BACKUP"
Expand Down Expand Up @@ -273,7 +274,7 @@ function merge_to_one() {
# $TARGET_BRANCH should be clean

# Assume we will succeed
outputs[i]=""
outputs[i]="(started)"
errors[i]=0

if [ "$is_continue" = true ]; then
Expand Down Expand Up @@ -354,6 +355,8 @@ function merge_to_one() {
fi
else
echo " No Merge conflicts, continuing..." | tee -a "$LOGFILE"
outputs[i]="(merged)"
errors[i]=0
# No "-m" as merge sets up a commit message for us to use.
git commit --no-edit 2>&1 | tee -a "$LOGFILE"
fi
Expand All @@ -373,6 +376,7 @@ function merge_to_one() {
res=${PIPESTATUS[0]}
if [ "$res" -ne 0 ] ; then
echo "Error $res in push to \"$TARGET_BRANCH\" branch." | tee -a "$LOGFILE"
outputs[i]="${outputs[i]}, error pushing to git"
errors[i]="$res"
exit_save_state "$res"
fi
Expand Down
11 changes: 6 additions & 5 deletions scripts/git-run-all-in-branches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SOURCE_BRANCH="main"

export GOOD_SKIP_TARGET_BRANCHES=(
)
TARGET_BRANCHES=(
export TARGET_BRANCHES=(
"main"
"storybook"
"ui-agnostic"
Expand All @@ -59,10 +59,11 @@ SEP1="$(printf "%100s\r" "" | tr ' ' '#')"
SEP2="$(printf "%100s\r" "" | tr ' ' '=')"
# SEP3="$(printf "%100s\r" "" | tr ' ' '-')"

outputs=()
errors=()
tms_real=()
branches_done=()
# Use export to make them available to child processes (so we can use sub-processes)
export outputs=()
export errors=()
export tms_real=()
export branches_done=()
function backup_state() {
if [ -f "$STATE_FILE" ]; then
[ -f "$STATE_FILE_BACKUP" ] && rm "$STATE_FILE_BACKUP"
Expand Down

0 comments on commit cc95297

Please sign in to comment.