Skip to content

Commit 7e196da

Browse files
authored
Merge pull request #11 from nahuhh/mac_build
mac: fix workflow, addcoin, and update mac dependencies
2 parents 51369c6 + 382a5db commit 7e196da

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
types:
1010
- opened
1111
- reopened
12-
- syncronize
12+
- synchronize
1313
push:
1414
# branches:
1515
# - master
@@ -29,7 +29,7 @@ jobs:
2929
formatting:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout/@v4
32+
- uses: actions/checkout@v4
3333
- name: Install dependencies
3434
run: |
3535
npm install prettier prettier-plugin-sh --save-dev
@@ -89,7 +89,7 @@ jobs:
8989
name: 'macOS (brew)'
9090
runs-on: macOS-latest
9191
steps:
92-
- uses: actions/checkout/@v4
92+
- uses: actions/checkout@v4
9393
- name: Install basicswap-bash
9494
run: |
9595
./basicswap-install.sh --new --tor --internal --regtest

bsx/addcoin.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ manage_daemon_false() {
2222

2323
## Remote node
2424
detect_os_arch
25-
if [[ -z "${MACOS}" ]] && ! [[ "${local_only[@]}" =~ "${addcoin}" ]]; then
25+
if ! [[ "${local_only[@]}" =~ "${addcoin}" ]]; then
2626
# Set wallet name
27-
ticker="${coin_map[$addcoin]}"
27+
if [[ "${MACOS}" ]]; then
28+
ticker="$(get_coin_ticker "${addcoin}")"
29+
else
30+
ticker="${coin_map[$addcoin]}"
31+
fi
2832
wallet_env="${ticker}_WALLET_NAME"
2933
wallet_name="BSX_${ticker}"
3034

bsx/shared.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ if [[ -z "${MACOS}" ]]; then
5454
)
5555
fi
5656

57+
# Coin map (Bash 3.2 compatible for MacOS)
58+
get_coin_ticker() {
59+
case "$1" in
60+
bitcoin) echo "BTC" ;;
61+
bitcoincash) echo "BCH" ;;
62+
dash) echo "DASH" ;;
63+
decred) echo "DCR" ;;
64+
dogecoin) echo "DOGE" ;;
65+
firo) echo "FIRO" ;;
66+
litecoin) echo "LTC" ;;
67+
monero) echo "XMR" ;;
68+
namecoin) echo "NMC" ;;
69+
pivx) echo "PIVX" ;;
70+
wownero) echo "WOW" ;;
71+
*) red "Invalid coin \"$1\"" && exit 1 ;;
72+
esac
73+
}
74+
5775
# Activate venv
5876
activate_venv() {
5977
source $SWAP_DATADIR/venv/bin/activate
@@ -172,7 +190,7 @@ detect_os_arch() {
172190
green "Installing Homebrew"
173191
INSTALL="curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | /bin/bash && brew install"
174192
fi
175-
DEPENDENCY="python gnupg pkg-config coreutils"
193+
DEPENDENCY="python gnupg pkg-config coreutils zeromq"
176194
green "\n\nDetected MacOS"
177195
elif type -p dnf > /dev/null; then
178196
# Fedora

0 commit comments

Comments
 (0)