From 8dd3a7d26744b59be3ee43d51201bcec3e4e48df Mon Sep 17 00:00:00 2001 From: Ondrej Sebela Date: Wed, 7 Apr 2021 14:42:39 +0200 Subject: [PATCH] Update 3. SIMPLIFIED EXPLANATION OF HOW IT WORKS.md --- 3. SIMPLIFIED EXPLANATION OF HOW IT WORKS.md | 32 +++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/3. SIMPLIFIED EXPLANATION OF HOW IT WORKS.md b/3. SIMPLIFIED EXPLANATION OF HOW IT WORKS.md index 01bb4e8..671f9ec 100644 --- a/3. SIMPLIFIED EXPLANATION OF HOW IT WORKS.md +++ b/3. SIMPLIFIED EXPLANATION OF HOW IT WORKS.md @@ -1,7 +1,7 @@ # Explanation of repository content, it's purpose and automation behind it -### Important content of repository and it's purpose +### Important content of the repository and it's purpose ``` <> @@ -54,5 +54,35 @@ └───profile.ps1 -- PowerShell profile, that will be copied to C:\Windows\System32\WindowsPowerShell\v1.0 (i.e. will be global PowerShell profile) on computers in variable $_computerWithProfile (defined in Variables module) -- contains many usefull features such as customized consoel title, that shows number of commits, this console is behind your computer state etc ``` +# How code validation works +- after you commit your changes, pre-commit git hook automatically initiate checks defined in pre-commit.ps1 +- only if all checks are passed, commit will be created and content distributed + - checks can stop creation of commit completely, or warn you about possible problems and let you decide, whether to continue + +## What is validated before commit is created +- that you are not trying to delete important repository files +- that Powershell files + - are encoded as UTF-8 or UTF-8 with BOM + - have valid syntax + - doesn't contain EN DASH, EM DASH instead of dash (it would lead to strange errors) + - doesn't contain #FIXME comment, otherwise warn about it + - from which modules are generated are in correct form +- warn about changed function parameters (in case, the functions is used elsewhere) +- warn about changed function aliases (in case, the alias is used elsewhere) +- warn about deleted function (in case, the function is used elsewhere) +- warn about changed variable value from module Variables (in case, the variable is used elsewhere) +- warn about deleted variable from module Variables (in case, the variable is used elsewhere) +- ... + + +# How distribution of content works +- after successful commit, content is automatically: + - pushed to GIT repository + - by post-commit GIT hook (post-commit.ps1) + - pulled to local server, processed and (clients part) distributed to shared folder + - by repo_sync.ps1 which is regularly run every 15 minutes by scheduled task + - from shared folder the content is being downloaded by clients in your Active Directory + - by PS_env_set_up.ps1 which is regularly run on client every 30 minutes by automatically created scheduled task (created via GPO PS_env_set_up) + TODO