Skip to content

Commit 0582488

Browse files
authored
Add bridges subtree (#18)
* Squashed 'bridges/' content from commit f346243 git-subtree-dir: bridges git-subtree-split: f346243 * add a BRIDGES.md document * brides -> bridges * trigger CI * Revert "trigger CI" This reverts commit a4390dc. * try sudo apt-get update
1 parent ff535df commit 0582488

File tree

132 files changed

+29836
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+29836
-117
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
- uses: actions/checkout@v3
2424

2525
- name: Install linux dependencies
26-
run: sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler
2729
2830
- name: Install Rust
2931
run: |

BRIDGES.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Using Parity Bridges Common dependency (`git subtree`).
2+
3+
In `./bridges` sub-directory you can find a `git subtree` imported version of:
4+
[parity-bridges-common](https://github.com/paritytech/parity-bridges-common/) repository.
5+
6+
# How to pull latest Bridges code to the `bridges` subtree
7+
(in practice)
8+
9+
The `bridges` repo has a stabilized branch `polkadot-v.1.0.0-audited` dedicated for releasing
10+
and based on Polkadot v1.0.0 code.
11+
12+
```
13+
cd <polkadot-bulletin-chain-git-repo-dir>
14+
15+
# needs to be done only once
16+
git remote add -f bridges https://github.com/paritytech/parity-bridges-common.git
17+
18+
# this will update new git branches from bridges repo
19+
# there could be unresolved conflicts, but dont worry,
20+
# lots of them are caused because of removed unneeded files with patch step,
21+
git fetch bridges --prune
22+
git subtree pull --prefix=bridges bridges polkadot-v.1.0.0-audited --squash
23+
24+
# so, after fetch and before solving conflicts just run patch,
25+
# this will remove unneeded files and checks if subtree modules compiles
26+
./bridges/scripts/verify-pallets-build.sh --ignore-git-state --no-revert
27+
28+
# if there are conflicts, this could help,
29+
# this removes locally deleted files at least (move changes to git stash for commit)
30+
git status -s | awk '$1 == "DU" || $1 == "D" || $1 == "MD" || $1 == "AD" {print $2}' | grep "^bridges/" | xargs git rm -q --ignore-unmatch
31+
32+
# (optional) when conflicts resolved, you can check build again - should pass
33+
# also important: this updates global Cargo.lock
34+
git commit --amend -S -m "updating bridges subtree + remove extra folders"
35+
36+
# add changes to the commit, first command `fetch` starts merge,
37+
# so after all conflicts are solved and patch passes and compiles,
38+
# then we need to finish merge with:
39+
git merge --continue
40+
````

0 commit comments

Comments
 (0)