Skip to content

Commit

Permalink
Create gitignore file in volume directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiimk committed Sep 7, 2020
1 parent f98f1bc commit d11a6e1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kamu-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kamu-cli"
version = "0.30.0"
version = "0.30.1"
description = "Decentralized data management tool"
authors = ["Sergii Mikhtoniuk <mikhtoniuk@gmail.com>"]
license = "MPL-2.0"
Expand Down
16 changes: 12 additions & 4 deletions kamu-cli/src/commands/init_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,19 @@ impl Command for InitCommand {
fs::create_dir_all(&self.workspace_layout.datasets_dir)?;
fs::create_dir_all(&self.workspace_layout.remotes_dir)?;
fs::create_dir_all(&self.workspace_layout.run_info_dir)?;
fs::create_dir_all(&self.workspace_layout.local_volume_dir)?;

let gitignore_path = self.workspace_layout.kamu_root_dir.join(".gitignore");
let mut gitignore = fs::File::create(gitignore_path)?;
writeln!(gitignore, "/config")?;
gitignore.sync_all()?;
{
let gitignore_path = self.workspace_layout.kamu_root_dir.join(".gitignore");
let mut gitignore = fs::File::create(gitignore_path)?;
writeln!(gitignore, "/config")?;
gitignore.sync_all()?;
}

{
let gitignore_path = self.workspace_layout.local_volume_dir.join(".gitignore");
fs::write(gitignore_path, "*\n".as_bytes())?;
}

eprintln!(
"{}",
Expand Down
2 changes: 1 addition & 1 deletion kamu-core-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kamu-test"
version = "0.30.0"
version = "0.30.1"
authors = ["Sergii Mikhtoniuk <mikhtoniuk@gmail.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion kamu-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kamu"
version = "0.30.0"
version = "0.30.1"
authors = ["Sergii Mikhtoniuk <mikhtoniuk@gmail.com>"]
edition = "2018"

Expand Down

0 comments on commit d11a6e1

Please sign in to comment.