mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(traverse): do not publish the build script
This commit is contained in:
parent
053f19dd19
commit
48bb97e53a
2 changed files with 9 additions and 11 deletions
|
|
@ -11,6 +11,7 @@ license.workspace = true
|
|||
repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
categories.workspace = true
|
||||
include = ["/src"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -1,20 +1,17 @@
|
|||
use std::{env, process::Command};
|
||||
|
||||
fn main() {
|
||||
// Exit if on CI.
|
||||
// The built files should be checked into git, so want to run tests etc on what's actually in repo,
|
||||
// rather than regenerating them.
|
||||
if std::option_env!("CI") == Some("true") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Re-run if NodeJS build script or AST types change
|
||||
println!("cargo:rerun-if-changed=scripts");
|
||||
println!("cargo:rerun-if-changed=../oxc_ast/src/ast");
|
||||
|
||||
// Exit if on CI.
|
||||
// The built files should be checked into git, so want to run tests etc on what's actually in repo,
|
||||
// rather than regenerating them.
|
||||
match env::var("CI") {
|
||||
Ok(value) if value == "true" => return,
|
||||
_ => {}
|
||||
}
|
||||
|
||||
// Run NodeJS build script
|
||||
let status = Command::new("node")
|
||||
let status = std::process::Command::new("node")
|
||||
.arg("./scripts/build.mjs")
|
||||
.status()
|
||||
.expect("Failed to run NodeJS build script");
|
||||
|
|
|
|||
Loading…
Reference in a new issue