Skip to content

Commit

Permalink
scripts/styleCheck: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tehraninasab committed Aug 7, 2023
1 parent c185305 commit 2f45679
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
13 changes: 13 additions & 0 deletions scripts/styleCheck.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/FileConventions/Config.fs
Original file line number Diff line number Diff line change
@@ -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"
13 changes: 0 additions & 13 deletions src/FileConventions/Helpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2f45679

Please sign in to comment.