1
1
#! /usr/bin/env bash
2
2
3
+ export LC_ALL=C
3
4
set -eo pipefail
4
5
5
6
BASE_ORIG=merged-master
6
7
BASE=" ${BASE_ORIG} "
7
8
BITCOIN_UPSTREAM_REMOTE=bitcoin
8
9
BITCOIN_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"
11
12
12
13
# Replace this with the location where we should put the fuzz test corpus
13
14
BITCOIN_QA_ASSETS=" ${HOME} /.tmp/bitcoin/qa-assets"
14
15
FUZZ_CORPUS=" ${BITCOIN_QA_ASSETS} /fuzz_seed_corpus/"
15
- mkdir -p " $( dirname ${BITCOIN_QA_ASSETS} ) "
16
+ mkdir -p " $( dirname " ${BITCOIN_QA_ASSETS} " ) "
16
17
17
18
# BEWARE: On some systems /tmp/ gets periodically cleaned, which may cause
18
19
# random files from this directory to disappear based on timestamp, and
@@ -100,13 +101,10 @@ if [[ "$SKIP_MERGE" == "1" ]]; then
100
101
fi
101
102
102
103
# # 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' )
110
108
111
109
cd " $WORKTREE "
112
110
@@ -122,19 +120,19 @@ quietly () {
122
120
123
121
# # Sort by unix timestamp and iterate over them
124
122
# 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
126
124
do
127
125
echo
128
126
echo " =-=-=-=-=-=-=-=-=-=-="
129
127
echo
130
128
131
- echo -e $line
129
+ echo -e " $line "
132
130
# # 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 :)
138
136
139
137
if [[ " $PR_ID " == " pull" ]]; then
140
138
PR_ID=" ${PR_ID_ALT} "
150
148
echo -e " Continuing build of \e[37m$PR_ID \e[0m at $( date) "
151
149
else
152
150
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 )"
154
152
fi
155
153
156
154
if [[ " $DO_BUILD " == " 1" ]]; then
0 commit comments