mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Merge Substrate master before checking Polkadot companion (#5916)
* Merge Substrate master before checking Polkadot companion * Also merge polkadot/master into the companion pr branch * Set email and user name
This commit is contained in:
@@ -39,15 +39,22 @@ substrate's branch. if it can't find anything, it will uses master instead
|
||||
|
||||
EOT
|
||||
|
||||
# Set the user name and email to make merging work
|
||||
git config --global user.name 'CI system'
|
||||
git config --global user.email '<>'
|
||||
|
||||
SUBSTRATE_PATH=$(pwd)
|
||||
|
||||
# Merge master into our branch before building Polkadot to make sure we don't miss
|
||||
# any commits that are required by Polkadot.
|
||||
git merge origin/master
|
||||
|
||||
# Clone the current Polkadot master branch into ./polkadot.
|
||||
git clone --depth 1 https://github.com/paritytech/polkadot.git
|
||||
|
||||
cd polkadot
|
||||
|
||||
# either it's a pull request then check for a companion otherwise use
|
||||
# either it's a pull request then check for a companion otherwise use
|
||||
# polkadot:master
|
||||
if expr match "${CI_COMMIT_REF_NAME}" '^[0-9]\+$' >/dev/null
|
||||
then
|
||||
@@ -78,12 +85,14 @@ then
|
||||
boldprint "companion pr specified/detected: #${pr_companion}"
|
||||
git fetch --depth 1 origin refs/pull/${pr_companion}/head:pr/${pr_companion}
|
||||
git checkout pr/${pr_companion}
|
||||
git merge origin/master
|
||||
else
|
||||
pr_ref="$(grep -Po '"ref"\s*:\s*"\K(?!master)[^"]*' "${pr_data_file}")"
|
||||
if git fetch --depth 1 origin "$pr_ref":branch/"$pr_ref" 2>/dev/null
|
||||
then
|
||||
boldprint "companion branch detected: $pr_ref"
|
||||
git checkout branch/"$pr_ref"
|
||||
git merge origin/master
|
||||
else
|
||||
boldprint "no companion branch found - building polkadot:master"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user