Delete env var NO_ZIG_INSTALLED since Zig is now installed on Netlify

This commit is contained in:
Brian Carroll 2022-05-15 12:57:37 +01:00
parent 3e7928096d
commit 6a91e66192
No known key found for this signature in database
GPG key ID: 9CF4E3BF9C4722C7
3 changed files with 1 additions and 23 deletions

View file

@ -20,15 +20,6 @@ fn zig_executable() -> String {
fn main() { fn main() {
println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=build.rs");
// 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;
}
// "." is relative to where "build.rs" is // "." is relative to where "build.rs" is
// dunce can be removed once ziglang/zig#5109 is fixed // dunce can be removed once ziglang/zig#5109 is fixed
let build_script_dir_path = dunce::canonicalize(Path::new(".")).unwrap(); let build_script_dir_path = dunce::canonicalize(Path::new(".")).unwrap();

View file

@ -13,15 +13,6 @@ fn main() {
let source_path = format!("src/{}.c", PLATFORM_FILENAME); let source_path = format!("src/{}.c", PLATFORM_FILENAME);
println!("cargo:rerun-if-changed={}", source_path); println!("cargo:rerun-if-changed={}", source_path);
// 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(); std::fs::create_dir_all("./data").unwrap();
// Zig can produce *either* an object containing relocations OR an object containing libc code // Zig can produce *either* an object containing relocations OR an object containing libc code

View file

@ -31,15 +31,11 @@ RUSTFLAGS=-Awarnings
# is set up to serve them. # is set up to serve them.
export ROC_DOCS_URL_ROOT=/builtins export ROC_DOCS_URL_ROOT=/builtins
# These just need to be defined so that some env! macros don't fail.
BUILTINS_WASM32_O=""
BUILTINS_HOST_O=""
cargo run --bin roc-docs compiler/builtins/roc/*.roc cargo run --bin roc-docs compiler/builtins/roc/*.roc
mv generated-docs/*.* www/build # move all the .js, .css, etc. files to build/ mv generated-docs/*.* www/build # move all the .js, .css, etc. files to build/
mv generated-docs/ www/build/builtins # move all the folders to build/builtins/ mv generated-docs/ www/build/builtins # move all the folders to build/builtins/
# Web REPL echo "Building Web REPL..."
repl_www/build.sh repl_www/build.sh
cp -r repl_www/public/* www/build cp -r repl_www/public/* www/build