Skip to content

Commit 7e6c5dc

Browse files
committed
Release 0.1.8: trash generated schema before generating new one
1 parent da165e3 commit 7e6c5dc

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Diff for: Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rust-purs-gql"
3-
version = "0.1.7"
3+
version = "0.1.8"
44
edition = "2021"
55
default-run = "pursgql"
66
repository = "https://github.com/OxfordAbstracts/purescript-graphql-schema-gen"

Diff for: src/main.rs

+12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::{
2+
fs::remove_dir_all,
23
sync::{Arc, Mutex},
34
thread::Result,
45
};
@@ -30,6 +31,17 @@ async fn main() -> Result<()> {
3031
// Fetch the workspace config
3132
let workspace_config = parse_workspace().await?;
3233

34+
// Trash existing schema
35+
for path in vec![
36+
workspace_config.postgres_enums_dir.clone(),
37+
workspace_config.shared_graphql_enums_dir.clone(),
38+
workspace_config.schema_libs_dir.clone(),
39+
]
40+
.iter()
41+
{
42+
remove_dir_all(path).ok();
43+
}
44+
3345
// Generate postgres enum types
3446
let postgres_types = fetch_types(&workspace_config)
3547
.await

0 commit comments

Comments
 (0)