Update dependencies
This commit is contained in:
parent
a008e20cc7
commit
535d13222d
842
Cargo.lock
generated
842
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -5,10 +5,9 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.1.1", features = ["derive", "env"] }
|
clap = { version = "4.1.1", features = ["derive", "env"] }
|
||||||
handlebars = "4.3.1"
|
handlebars = "5.1.0"
|
||||||
env_logger = "0.10.0"
|
env_logger = "0.11.2"
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
http = "0.2.8"
|
|
||||||
serde = { version = "1.0.126", features = ["derive"] }
|
serde = { version = "1.0.126", features = ["derive"] }
|
||||||
reqwest = { version = "0.11", features = ["json", "blocking", "rustls"] }
|
reqwest = { version = "0.11", features = ["json", "blocking", "rustls"] }
|
||||||
serde_yaml = "0.9"
|
serde_yaml = "0.9"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM rust:1.70.0-slim-bookworm as builder
|
FROM rust:1.76.0-slim-bookworm as builder
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
RUN apt-get update &&\
|
RUN apt-get update &&\
|
||||||
apt-get install -y libssl-dev gcc musl pkg-config
|
apt-get install -y libssl-dev gcc musl pkg-config
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use handlebars::Handlebars;
|
use handlebars::Handlebars;
|
||||||
use http::StatusCode;
|
|
||||||
use log::{error, info};
|
use log::{error, info};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -119,8 +118,8 @@ fn main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
info!("Running on {} {}", OS, ARCH);
|
info!("Running on {} {}", OS, ARCH);
|
||||||
let oss = config.os.get(&OS.clone().to_string()).unwrap();
|
let oss = config.os.get(&OS.to_string()).unwrap();
|
||||||
let archs = config.arch.get(&ARCH.clone().to_string()).unwrap();
|
let archs = config.arch.get(&ARCH.to_string()).unwrap();
|
||||||
|
|
||||||
for arch in archs {
|
for arch in archs {
|
||||||
for os in oss {
|
for os in oss {
|
||||||
@ -134,7 +133,7 @@ fn main() {
|
|||||||
let link = reg.render("download_link", &values).unwrap();
|
let link = reg.render("download_link", &values).unwrap();
|
||||||
info!("Trying to download from {}", link.clone());
|
info!("Trying to download from {}", link.clone());
|
||||||
let mut resp = reqwest::blocking::get(link).unwrap();
|
let mut resp = reqwest::blocking::get(link).unwrap();
|
||||||
if resp.status() == StatusCode::OK {
|
if resp.status().is_success() {
|
||||||
info!("Response is 200, I'll try to download");
|
info!("Response is 200, I'll try to download");
|
||||||
let mut out =
|
let mut out =
|
||||||
File::create(args.download_path.clone()).expect("failed to create file");
|
File::create(args.download_path.clone()).expect("failed to create file");
|
||||||
|
Loading…
Reference in New Issue
Block a user