-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from UnsafeOats/rust_build_refactor
Refactored build process
- Loading branch information
Showing
9 changed files
with
423 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/target | ||
/tests/test_resources | ||
~ | ||
build.ds |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "bhop" | ||
version = "0.3.0" | ||
version = "0.4.0" | ||
edition = "2021" | ||
authors = ["Shane Stephenson <[email protected]>"] | ||
readme = "README.md" | ||
|
@@ -26,6 +26,10 @@ serial_test = "1.0.0" | |
tempdir = "0.3.7" | ||
proceed = "0.1.0" | ||
|
||
[build-dependencies] | ||
dirs = "4.0.0" | ||
anyhow = "1.0" | ||
|
||
[[bin]] | ||
name = "bhop" | ||
path = "src/main.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#[path = "runners/add_runners.rs"] | ||
mod add_runners; | ||
use add_runners::{ | ||
Runners, | ||
Shell::{Bash, Nushell, Powershell, Zsh}, | ||
}; | ||
|
||
fn main() { | ||
println!("Building Bunnyhop version {}", env!("CARGO_PKG_VERSION")); | ||
for script in ["add_runners.rs", "runner.ps1", "runner.sh", "runner.nu"].iter() { | ||
println!("cargo:rerun-if-changed=runners/{}", script); | ||
} | ||
for env_var in [ | ||
"BUNNYHOP_ZSH_CONFIG_DIR", | ||
"BUNNYHOP_BASH_CONFIG_DIR", | ||
"BUNNYHOP_NUSHELL_CONFIG_DIR", | ||
"BUNNYHOP_POWERSHELL_CONFIG_DIR", | ||
] | ||
.iter() | ||
{ | ||
println!("cargo:rerun-if-env-changed={}", env_var); | ||
} | ||
|
||
// Any new shells added in the future must be added in the following vector to be properly | ||
// configured with their respective runner script when `Bunnyhop` is built. | ||
let supported_shells = vec![Zsh, Bash, Nushell, Powershell]; | ||
let runners = Runners::new(supported_shells); | ||
runners.add_runners(); | ||
} |
Oops, something went wrong.