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