File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 4646 # git pull --allow-unrelated-histories prod main || echo "Git pull failed"
4747 # git push prod main --force
4848
49-
49+ - name : Update README with repository links
50+ run : ./build/update-readme.sh
51+
52+ - name : Commit and push changes
53+ run : |
54+ git config --local user.email "[email protected] " 55+ git config --local user.name "GitHub Action"
56+ git add README.md
57+ git commit -m "Update README with exchange repository links" || echo "No changes to commit"
58+ git push
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Define array of exchanges
4+ EXCHANGES=(" binance" " kucoin" " coinbase" " kraken" " bybit" )
5+
6+ # Create the section content in a variable
7+ SECTION=$' \n ## Exchange Repositories\n\n '
8+
9+ # Generate links for each exchange
10+ for exchange in " ${EXCHANGES[@]} " ; do
11+ SECTION+=" - [python-${exchange} ](https://github.com/ccxt/python-${exchange} .git)" $' \n '
12+ done
13+
14+ # Update README with perl (no temp files)
15+ perl -i -0pe " s/## Exchange Repositories.*?(^##|\Z)/$SECTION \$ 1/ms" README.md || {
16+ # If section doesn't exist, append it
17+ echo " $SECTION " >> README.md
18+ }
19+
20+ # Display the changes
21+ cat README.md
You can’t perform that action at this time.
0 commit comments