11#! /usr/bin/env bash
22
3+ export LC_ALL=C
34set -eo pipefail
45
56BASE_ORIG=merged-master
67BASE=" ${BASE_ORIG} "
78BITCOIN_UPSTREAM_REMOTE=bitcoin
89BITCOIN_UPSTREAM=" ${BITCOIN_UPSTREAM_REMOTE} /master"
9- ELEMENTS_UPSTREAM_REMOTE=upstream
10- ELEMENTS_UPSTREAM=" ${ELEMENTS_UPSTREAM_REMOTE} /master"
10+ # ELEMENTS_UPSTREAM_REMOTE=upstream
11+ # ELEMENTS_UPSTREAM="${ELEMENTS_UPSTREAM_REMOTE}/master"
1112
1213# Replace this with the location where we should put the fuzz test corpus
1314BITCOIN_QA_ASSETS=" ${HOME} /.tmp/bitcoin/qa-assets"
1415FUZZ_CORPUS=" ${BITCOIN_QA_ASSETS} /fuzz_seed_corpus/"
15- mkdir -p " $( dirname ${BITCOIN_QA_ASSETS} ) "
16+ mkdir -p " $( dirname " ${BITCOIN_QA_ASSETS} " ) "
1617
1718# BEWARE: On some systems /tmp/ gets periodically cleaned, which may cause
1819# random files from this directory to disappear based on timestamp, and
@@ -100,13 +101,10 @@ if [[ "$SKIP_MERGE" == "1" ]]; then
100101fi
101102
102103# # Get full list of merges
103- ELT_COMMITS=$( git -C " $WORKTREE " log " $ELEMENTS_UPSTREAM " --not $BASE --merges --first-parent --pretty=' format:%ct %cI %h Elements %s' )
104- BTC_COMMITS=$( git -C " $WORKTREE " log " $BITCOIN_UPSTREAM " --not $BASE --merges --first-parent --pretty=' format:%ct %cI %h Bitcoin %s' )
105-
106- # ELT_COMMITS=
107- # BTC_COMMITS=$(git -C "$WORKTREE" log v0.21.0 --not $BASE --merges --first-parent --pretty='format:%ct %cI %h Bitcoin %s')
108-
109- # play /home/apoelstra/games/Hover/sounds/mixed/hit_wall.wav 2>/dev/null ## play start sound
104+ # for elements
105+ # COMMITS=$(git -C "$WORKTREE" log "$ELEMENTS_UPSTREAM" --not $BASE --merges --first-parent --pretty='format:%ct %cI %h Elements %s')
106+ # for bitcoin
107+ COMMITS=$( git -C " $WORKTREE " log " $BITCOIN_UPSTREAM " --not $BASE --merges --first-parent --pretty=' format:%ct %cI %h Bitcoin %s' )
110108
111109cd " $WORKTREE "
112110
@@ -122,19 +120,19 @@ quietly () {
122120
123121# # Sort by unix timestamp and iterate over them
124122# echo "$ELT_COMMITS" "$BTC_COMMITS" | sort -n -k1 | while read line
125- echo " $ELT_COMMITS " | tac | while read line
123+ echo " $COMMITS " | tac | while read -r line
126124do
127125 echo
128126 echo " =-=-=-=-=-=-=-=-=-=-="
129127 echo
130128
131- echo -e $line
129+ echo -e " $line "
132130 # # Extract data and output what we're doing
133- DATE=$( echo $line | cut -d ' ' -f 2)
134- HASH=$( echo $line | cut -d ' ' -f 3)
135- CHAIN=$( echo $line | cut -d ' ' -f 4)
136- PR_ID=$( echo $line | cut -d ' ' -f 6 | tr -d :)
137- PR_ID_ALT=$( echo $line | cut -d ' ' -f 8 | tr -d :)
131+ DATE=$( echo " $line " | cut -d ' ' -f 2)
132+ HASH=$( echo " $line " | cut -d ' ' -f 3)
133+ CHAIN=$( echo " $line " | cut -d ' ' -f 4)
134+ PR_ID=$( echo " $line " | cut -d ' ' -f 6 | tr -d :)
135+ PR_ID_ALT=$( echo " $line " | cut -d ' ' -f 8 | tr -d :)
138136
139137 if [[ " $PR_ID " == " pull" ]]; then
140138 PR_ID=" ${PR_ID_ALT} "
150148 echo -e " Continuing build of \e[37m$PR_ID \e[0m at $( date) "
151149 else
152150 echo -e " Start merge/build of \e[37m$PR_ID \e[0m at $( date) "
153- git -C " $WORKTREE " merge $HASH --no-ff -m " Merge $HASH into merged_master ($CHAIN PR $PR_ID )"
151+ git -C " $WORKTREE " merge " $HASH " --no-ff -m " Merge $HASH into merged_master ($CHAIN PR $PR_ID )"
154152 fi
155153
156154 if [[ " $DO_BUILD " == " 1" ]]; then
0 commit comments