mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-11 14:41:16 -07:00
server: version repo url when not in dev mode
This commit is contained in:
@@ -4,11 +4,9 @@
|
|||||||
#![doc = "```"]
|
#![doc = "```"]
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::BTreeMap,
|
|
||||||
fs,
|
fs,
|
||||||
io::Cursor,
|
io::Cursor,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
sync::Arc,
|
|
||||||
time::Instant,
|
time::Instant,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -70,9 +68,10 @@ impl Server {
|
|||||||
if !fs::exists(&downloaded_websites_path)? {
|
if !fs::exists(&downloaded_websites_path)? {
|
||||||
info!("Downloading websites from Github...");
|
info!("Downloading websites from Github...");
|
||||||
|
|
||||||
// TODO: Need to download versioned, main is only for testing
|
let url = format!(
|
||||||
let url =
|
"https://github.com/bitcoinresearchkit/brk/archive/refs/tags/v{}.zip",
|
||||||
"https://github.com/bitcoinresearchkit/brk/archive/refs/heads/main.zip";
|
env!("CARGO_PKG_VERSION")
|
||||||
|
);
|
||||||
|
|
||||||
let response = minreq::get(url).send()?;
|
let response = minreq::get(url).send()?;
|
||||||
let bytes = response.as_bytes();
|
let bytes = response.as_bytes();
|
||||||
|
|||||||
Reference in New Issue
Block a user