mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
prepare: Add an env var to switch core repositories.
This commit is contained in:
@@ -50,6 +50,7 @@ from basicswap.bin.run import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Coin clients
|
# Coin clients
|
||||||
|
PARTICL_REPO = os.getenv("PARTICL_REPO", "particl")
|
||||||
PARTICL_VERSION = os.getenv("PARTICL_VERSION", "23.2.7.0")
|
PARTICL_VERSION = os.getenv("PARTICL_VERSION", "23.2.7.0")
|
||||||
PARTICL_VERSION_TAG = os.getenv("PARTICL_VERSION_TAG", "")
|
PARTICL_VERSION_TAG = os.getenv("PARTICL_VERSION_TAG", "")
|
||||||
PARTICL_LINUX_EXTRA = os.getenv("PARTICL_LINUX_EXTRA", "nousb")
|
PARTICL_LINUX_EXTRA = os.getenv("PARTICL_LINUX_EXTRA", "nousb")
|
||||||
@@ -887,7 +888,6 @@ def prepareCore(coin, version_data, settings, data_dir, extra_opts={}):
|
|||||||
downloadFile(assert_sig_url, assert_sig_path)
|
downloadFile(assert_sig_url, assert_sig_path)
|
||||||
else:
|
else:
|
||||||
major_version = int(version.split(".")[0])
|
major_version = int(version.split(".")[0])
|
||||||
|
|
||||||
use_guix: bool = coin in ("dash",) or major_version >= 22
|
use_guix: bool = coin in ("dash",) or major_version >= 22
|
||||||
arch_name = BIN_ARCH
|
arch_name = BIN_ARCH
|
||||||
if os_name == "osx" and use_guix:
|
if os_name == "osx" and use_guix:
|
||||||
@@ -908,22 +908,22 @@ def prepareCore(coin, version_data, settings, data_dir, extra_opts={}):
|
|||||||
coin, version + version_tag, arch_name, filename_extra, FILE_EXT
|
coin, version + version_tag, arch_name, filename_extra, FILE_EXT
|
||||||
)
|
)
|
||||||
if coin == "particl":
|
if coin == "particl":
|
||||||
release_url = "https://github.com/particl/particl-core/releases/download/v{}/{}".format(
|
release_url = (
|
||||||
version + version_tag, release_filename
|
"https://github.com/{}/particl-core/releases/download/v{}/{}".format(
|
||||||
|
PARTICL_REPO, version + version_tag, release_filename
|
||||||
|
)
|
||||||
)
|
)
|
||||||
assert_filename = "{}-{}-{}-build.assert".format(coin, os_name, version)
|
assert_filename = "{}-{}-{}-build.assert".format(coin, os_name, version)
|
||||||
if use_guix:
|
if use_guix:
|
||||||
assert_url = f"https://raw.githubusercontent.com/particl/guix.sigs/master/{version}/{signing_key_name}/all.SHA256SUMS"
|
assert_url = f"https://raw.githubusercontent.com/{PARTICL_REPO}/guix.sigs/master/{version}/{signing_key_name}/all.SHA256SUMS"
|
||||||
else:
|
else:
|
||||||
assert_url = (
|
assert_url = "https://raw.githubusercontent.com/{}/gitian.sigs/master/{}-{}/{}/{}".format(
|
||||||
"https://raw.githubusercontent.com/particl/gitian.sigs/master/%s-%s/%s/%s"
|
PARTICL_REPO,
|
||||||
% (
|
|
||||||
version + version_tag,
|
version + version_tag,
|
||||||
os_dir_name,
|
os_dir_name,
|
||||||
signing_key_name,
|
signing_key_name,
|
||||||
assert_filename,
|
assert_filename,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
elif coin == "litecoin":
|
elif coin == "litecoin":
|
||||||
release_url = "https://github.com/litecoin-project/litecoin/releases/download/v{}/{}".format(
|
release_url = "https://github.com/litecoin-project/litecoin/releases/download/v{}/{}".format(
|
||||||
version + version_tag, release_filename
|
version + version_tag, release_filename
|
||||||
|
|||||||
Reference in New Issue
Block a user