we don't have to commit styles.css, actually
Some checks failed
arche-build-and-publish / gractwo-arche-build-test (push) Failing after 17s
Some checks failed
arche-build-and-publish / gractwo-arche-build-test (push) Failing after 17s
This commit is contained in:
17
build.rs
17
build.rs
@@ -10,14 +10,21 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
if std::env::var("IN_DOCKER").is_err() {
|
||||
let os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_else(|_| String::from("unknown"));
|
||||
let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_else(|_| String::from("unknown"));
|
||||
let download_url = match (os.as_str(), arch.as_str()) {
|
||||
("macos", "aarch64") => {
|
||||
let env = env::var("CARGO_CFG_TARGET_ENV").unwrap_or_else(|_| String::from("unknown"));
|
||||
let download_url = match (os.as_str(), arch.as_str(), env.as_str()) {
|
||||
("macos", "aarch64", _) => {
|
||||
"https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-arm64"
|
||||
}
|
||||
("linux", "x86_64") => {
|
||||
("linux", "x86_64", "musl") => {
|
||||
"https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64-musl"
|
||||
}
|
||||
("linux", "x86_64", _) => {
|
||||
"https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64"
|
||||
}
|
||||
("linux", "aarch64") => {
|
||||
("linux", "aarch64", "musl") => {
|
||||
"https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-arm64-musl"
|
||||
}
|
||||
("linux", "aarch64", _) => {
|
||||
"https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-arm64"
|
||||
}
|
||||
_ => return Err(format!("Unsupported platform: {} {}", os, arch).into()),
|
||||
@@ -40,7 +47,7 @@ fn run_tailwind(bin: &PathBuf) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let basedir = std::env::var("CARGO_MANIFEST_DIR").unwrap_or_else(|_| ".".into());
|
||||
let input = Path::new(&basedir).join("web").join("input.css");
|
||||
let inputstr = input.to_str().unwrap();
|
||||
let output = Path::new(&basedir).join("web").join("styles.css");
|
||||
let output = PathBuf::from(env::var("OUT_DIR")?).join("styles.css");
|
||||
let outputstr = output.to_str().unwrap();
|
||||
let args = vec!["-i", inputstr, "-o", outputstr, "--minify"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user