From 6a91e661921ea00d6ad4604d67ac6e938f471eb6 Mon Sep 17 00:00:00 2001 From: Brian Carroll Date: Sun, 15 May 2022 12:57:37 +0100 Subject: [PATCH] Delete env var NO_ZIG_INSTALLED since Zig is now installed on Netlify --- compiler/builtins/build.rs | 9 --------- repl_wasm/build.rs | 9 --------- www/build.sh | 6 +----- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/compiler/builtins/build.rs b/compiler/builtins/build.rs index 59503cc89a..2805784dec 100644 --- a/compiler/builtins/build.rs +++ b/compiler/builtins/build.rs @@ -20,15 +20,6 @@ fn zig_executable() -> String { fn main() { 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 // dunce can be removed once ziglang/zig#5109 is fixed let build_script_dir_path = dunce::canonicalize(Path::new(".")).unwrap(); diff --git a/repl_wasm/build.rs b/repl_wasm/build.rs index b050c20673..832a1b7c56 100644 --- a/repl_wasm/build.rs +++ b/repl_wasm/build.rs @@ -13,15 +13,6 @@ fn main() { let source_path = format!("src/{}.c", PLATFORM_FILENAME); 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(); // Zig can produce *either* an object containing relocations OR an object containing libc code diff --git a/www/build.sh b/www/build.sh index f5a9ea868b..382c4a7227 100755 --- a/www/build.sh +++ b/www/build.sh @@ -31,15 +31,11 @@ RUSTFLAGS=-Awarnings # is set up to serve them. 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 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/ -# Web REPL +echo "Building Web REPL..." repl_www/build.sh cp -r repl_www/public/* www/build