From f6b2dbc14428c4ce389a595941f92df28eb5ea50 Mon Sep 17 00:00:00 2001 From: PgBiel <9021226+PgBiel@users.noreply.github.com> Date: Fri, 26 Apr 2024 01:42:29 -0300 Subject: [PATCH] Revert "cli/new: temporarily disable GitHub workflow" This reverts commit a1cb7b74ca6d9a813d5e97e5b09918a2bf3fad94. --- compiler-cli/src/new.rs | 8 +++----- compiler-cli/src/new/tests.rs | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/compiler-cli/src/new.rs b/compiler-cli/src/new.rs index 827931370..f815bbd11 100644 --- a/compiler-cli/src/new.rs +++ b/compiler-cli/src/new.rs @@ -39,7 +39,6 @@ pub struct Creator { root: Utf8PathBuf, src: Utf8PathBuf, test: Utf8PathBuf, - #[allow(dead_code)] github: Utf8PathBuf, workflows: Utf8PathBuf, external: Utf8PathBuf, @@ -87,7 +86,7 @@ impl FileToCreate { pub fn contents(&self, creator: &Creator) -> Option { let project_name = &creator.project_name; let skip_git = creator.options.skip_git; - let skip_github = true; // creator.options.skip_github; + let skip_github = creator.options.skip_github; match self { Self::Readme => Some(format!( @@ -522,9 +521,8 @@ impl Creator { crate::fs::mkdir(&self.external)?; if !self.options.skip_git && !self.options.skip_github { - // Currently disabled - // crate::fs::mkdir(&self.github)?; - // crate::fs::mkdir(&self.workflows)?; + crate::fs::mkdir(&self.github)?; + crate::fs::mkdir(&self.workflows)?; } if self.options.skip_git { diff --git a/compiler-cli/src/new/tests.rs b/compiler-cli/src/new/tests.rs index 8738cc936..859c5ce36 100644 --- a/compiler-cli/src/new/tests.rs +++ b/compiler-cli/src/new/tests.rs @@ -27,8 +27,7 @@ fn new() { assert!(path.join("gleam.toml").exists()); assert!(path.join("src/my_project.gleam").exists()); assert!(path.join("test/my_project_test.gleam").exists()); - // TODO: Create Glistix workflow file - // assert!(path.join(".github/workflows/test.yml").exists()); + assert!(path.join(".github/workflows/test.yml").exists()); // Don't add external/stdlib to testing as they depend on // the network