Skip to content

Commit

Permalink
rp2040-adt7310 に secret いらない
Browse files Browse the repository at this point in the history
  • Loading branch information
Tosainu committed Aug 24, 2024
1 parent f54d2e4 commit 98e883f
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions rp2040-adt7310/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use std::env;
use std::fs::File;
use std::io::{BufRead, BufReader, Write};
use std::io::Write;
use std::path::PathBuf;

fn main() {
Expand All @@ -32,23 +32,4 @@ fn main() {
{
println!("cargo:rustc-link-arg=-Tdefmt.x");
}

let (id, password) = File::open("secrets.txt")
.and_then(|file| {
let mut file = BufReader::new(file);
let mut id = String::new();
file.read_line(&mut id)?;
let mut password = String::new();
file.read_line(&mut password)?;
Ok((id, password))
})
.unwrap_or_else(|_| {
(
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".into(),
"xxxxxxxxxxxx".into(),
)
});
println!("cargo:rustc-env=SECRETS_ROUTE_B_ID={id}");
println!("cargo:rustc-env=SECRETS_ROUTE_B_PASSWORD={password}");
println!("cargo:rerun-if-changed=secrets.txt");
}

0 comments on commit 98e883f

Please sign in to comment.