From 2f456791793dde0a92884c318569b5f7f95d50cc Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 7 Aug 2023 13:47:06 +0330 Subject: [PATCH] scripts/styleCheck: refactor --- scripts/styleCheck.fsx | 13 +++++++++++++ src/FileConventions/Config.fs | 6 +++--- src/FileConventions/Helpers.fs | 13 ------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/styleCheck.fsx b/scripts/styleCheck.fsx index 7b6f7e378..e3f87c3c3 100644 --- a/scripts/styleCheck.fsx +++ b/scripts/styleCheck.fsx @@ -166,6 +166,19 @@ let CheckStyleOfXamlFiles(rootDir: DirectoryInfo) : bool = let rootDir = Path.Combine(__SOURCE_DIRECTORY__, "..") |> DirectoryInfo +// We need this step so we can change the files using `npx prettier --write` in the prettier calls. +// Otherwise we get permission denied error in the CI. +Process + .Execute( + { + Command = "chmod" + Arguments = "777 --recursive ." + }, + Echo.Off + ) + .UnwrapDefault() +|> ignore + let processSuccessStates = [| CheckStyleOfFSharpFiles rootDir diff --git a/src/FileConventions/Config.fs b/src/FileConventions/Config.fs index 50d1801c9..58f739e52 100644 --- a/src/FileConventions/Config.fs +++ b/src/FileConventions/Config.fs @@ -1,5 +1,5 @@ module Config -let fantomlessToolVersion = "4.7.997-prerelease" -let prettierVersion = "2.8.3" -let pluginXmlVersion = "v2.2.0" +let FantomlessToolVersion = "4.7.997-prerelease" +let PrettierVersion = "2.8.3" +let PluginXmlVersion = "v2.2.0" diff --git a/src/FileConventions/Helpers.fs b/src/FileConventions/Helpers.fs index 17a4f3f95..63b7a5f7a 100644 --- a/src/FileConventions/Helpers.fs +++ b/src/FileConventions/Helpers.fs @@ -212,19 +212,6 @@ let InstallPrettierPluginXml(version: string) = let RunPrettier(arguments: string) = - // We need this step so we can change the files using `npx prettier --write` in the next step. - // Otherwise we get permission denied error in the CI. - Process - .Execute( - { - Command = "chmod" - Arguments = "777 --recursive ." - }, - Echo.Off - ) - .UnwrapDefault() - |> ignore - Process.Execute( { Command = "npx"