mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Add NO_ZIG_INSTALLED check to Netlify build
This commit is contained in:
parent
1c116d71b3
commit
02ecb63b48
1 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
use std::env;
|
||||
use std::ffi::OsStr;
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
@ -11,6 +12,15 @@ fn main() {
|
|||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:rerun-if-changed=src/{}.c", PLATFORM_FILENAME);
|
||||
|
||||
// When we build on Netlify, zig is not installed (but also not used,
|
||||
// since all we're doing is generating docs), so we can skip the steps
|
||||
// that require having zig installed.
|
||||
if env::var_os("NO_ZIG_INSTALLED").is_some() {
|
||||
// We still need to do the other things before this point, because
|
||||
// setting the env vars is needed for other parts of the build.
|
||||
return;
|
||||
}
|
||||
|
||||
std::fs::create_dir_all("./data").unwrap();
|
||||
|
||||
// Build a pre-linked binary with platform, builtins and all their libc dependencies
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue