forked from Cutieguwu/raven
Fix build; Correct target/ path in generated .gitignore
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -140,6 +140,7 @@ fn init() -> anyhow::Result<()> {
|
||||
f.write_all(include_bytes!("../assets/src/main/Main.java"))?;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Make src/test/Test.java
|
||||
if let Result::Ok(mut f) = OpenOptions::new().write(true).create_new(is_empty).open(
|
||||
DIR_TEST
|
||||
@@ -148,6 +149,16 @@ fn init() -> anyhow::Result<()> {
|
||||
.with_extension(JAVA_EXT_SOURCE),
|
||||
) {
|
||||
f.write_all(include_bytes!("../assets/src/test/Test.java"))?;
|
||||
=======
|
||||
// Make src/test/MainTest.java
|
||||
if let Result::Ok(mut f) = OpenOptions::new().write(true).create_new(is_empty).open(
|
||||
DIR_TEST
|
||||
.clone()
|
||||
.join("MainTest")
|
||||
.with_extension(JAVA_EXT_SOURCE),
|
||||
) {
|
||||
f.write_all(include_bytes!("../assets/src/test/MainTest.java"))?;
|
||||
>>>>>>> e79c26c (Fix build; Correct target/ path in generated .gitignore)
|
||||
}
|
||||
|
||||
// git init .
|
||||
@@ -164,7 +175,7 @@ fn init() -> anyhow::Result<()> {
|
||||
f.read_to_string(&mut buf)?;
|
||||
|
||||
for ignored in [
|
||||
DIR_TARGET.as_path().display().to_string(),
|
||||
format!("{}/", DIR_TARGET.file_name().unwrap().display()),
|
||||
format!("*.{}", JAVA_EXT_CLASS),
|
||||
] {
|
||||
if !buf.contains(&ignored) {
|
||||
|
||||
Reference in New Issue
Block a user