Skip to content

Commit

Permalink
Deploying AL-Go from main (37e4e3fac9276ad13dc998d03f7bf0fdad577d19) …
Browse files Browse the repository at this point in the history
…to main (#16)

Deploying AL-Go from main (37e4e3fac9276ad13dc998d03f7bf0fdad577d19) to
main

Co-authored-by: microsoft <[email protected]>
  • Loading branch information
bcbuild-github-agent and microsoft authored Sep 27, 2023
1 parent 2402ac5 commit a26f554
Show file tree
Hide file tree
Showing 59 changed files with 2,048 additions and 1,552 deletions.
814 changes: 459 additions & 355 deletions AL-Go-Helper.ps1

Large diffs are not rendered by default.

283 changes: 142 additions & 141 deletions AL-Go-TestRepoHelper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Test-Shell {
}
}

function Test-Json {
function Test-SettingsJson {
Param(
[hashtable] $json,
[string] $settingsDescription,
Expand All @@ -59,7 +59,8 @@ function Test-Json {
Test-Property -settingsDescription $settingsDescription -json $json -key 'templateUrl' -should
}
if ($type -eq 'Project') {
# Test for things that should / should not exist in a project settings file
# GitHubRunner should not be in a project settings file (only read from repo or workflow settings)
Test-Property -settingsDescription $settingsDescription -json $json -key 'githubRunner' -shouldnot
}
if ($type -eq 'Workflow') {
# Test for things that should / should not exist in a workflow settings file
Expand All @@ -71,8 +72,9 @@ function Test-Json {
# templateUrl should not be in Project or Workflow settings
Test-Property -settingsDescription $settingsDescription -json $json -key 'templateUrl' -maynot

# schedules and runs-on should not be in Project or Workflow settings
'nextMajorSchedule','nextMinorSchedule','currentSchedule','githubRunner','runs-on' | ForEach-Object {
# schedules and runs-on should not be in Project or Workflow settings
# These properties are used in Update AL-Go System Files, hence they should only be in Repo settings
'nextMajorSchedule','nextMinorSchedule','currentSchedule','runs-on' | ForEach-Object {
Test-Property -settingsDescription $settingsDescription -json $json -key $_ -shouldnot
}
}
Expand All @@ -92,7 +94,7 @@ function Test-JsonStr {

try {
$json = $jsonStr | ConvertFrom-Json | ConvertTo-HashTable
Test-Json -json $json -settingsDescription $settingsDescription -type:$type
Test-SettingsJson -json $json -settingsDescription $settingsDescription -type:$type
}
catch {
throw "$($_.Exception.Message.Replace("`r",'').Replace("`n",' '))"
Expand All @@ -116,9 +118,9 @@ function Test-JsonFile {

function Test-ALGoRepository {
Param(
[string] $baseFolder
[string] $baseFolder = $ENV:GITHUB_WORKSPACE
)

if ($ENV:ALGoOrgSettings) {
Write-Host "Checking AL-Go Org Settings variable (ALGoOrgSettings)"
Test-JsonStr -jsonStr "$ENV:ALGoOrgSettings" -settingsDescription 'ALGoOrgSettings variable' -type 'Variable'
Expand Down Expand Up @@ -149,141 +151,140 @@ function Test-ALGoRepository {
}

function Write-Big {
Param(
[string] $str
)
$chars = @{
"0" = @'
___
/ _ \
| | | |
| | | |
| |_| |
\___/
'@.Split("`n")
"1" = @'
__
/_ |
| |
| |
| |
|_|
'@.Split("`n")
"2" = @'
___
|__ \
) |
/ /
/ /_
|____|
'@.Split("`n")
"3" = @'
____
|___ \
__) |
|__ <
___) |
|____/
'@.Split("`n")
"4" = @'
_ _
| || |
| || |_
|__ _|
| |
|_|
'@.Split("`n")
"5" = @'
_____
| ____|
| |__
|___ \
___) |
|____/
'@.Split("`n")
"6" = @'
__
/ /
/ /_
| '_ \
| (_) |
\___/
'@.Split("`n")
"7" = @'
______
|____ |
/ /
/ /
/ /
/_/
'@.Split("`n")
"8" = @'
___
/ _ \
| (_) |
> _ <
| (_) |
\___/
'@.Split("`n")
"9" = @'
___
/ _ \
| (_) |
\__, |
/ /
/_/
'@.Split("`n")
"." = @'
_
(_)
'@.Split("`n")
"v" = @'
__ __
\ \ / /
\ V /
\_(_)
'@.Split("`n")
"p" = @'
_____ _
| __ \ (_)
| |__) | __ _____ ___ _____ __
| ___/ '__/ _ \ \ / / |/ _ \ \ /\ / /
| | | | | __/\ V /| | __/\ V V /
|_| |_| \___| \_/ |_|\___| \_/\_/
'@.Split("`n")
"d" = @'
_____
| __ \
| | | | _____ __
| | | |/ _ \ \ / /
| |__| | __/\ V /
|_____/ \___| \_(_)
'@.Split("`n")
"a" = @'
_ _____ __ _____ _ _ _ _ _
/\ | | / ____| / _| / ____(_) | | | | | | |
/ \ | | ______| | __ ___ | |_ ___ _ __ | | __ _| |_| |__| |_ _| |__
/ /\ \ | | |______| | |_ |/ _ \ | _/ _ \| '__| | | |_ | | __| __ | | | | '_ \
/ ____ \| |____ | |__| | (_) | | || (_) | | | |__| | | |_| | | | |_| | |_) |
/_/ \_\______| \_____|\___/ |_| \___/|_| \_____|_|\__|_| |_|\__,_|_.__/
'@.Split("`n")
}

Param(
[string] $str
)
$chars = @{
"0" = @(
" ___ "
" / _ \ "
"| | | |"
"| | | |"
"| |_| |"
" \___/ "
)
"1" = @(
" __ "
"/_ |"
" | |"
" | |"
" | |"
" |_|"
)
"2" = @(
" ___ "
"|__ \ "
" ) |"
" / / "
" / /_ "
"|____|"
)
"3" = @(
" ____ "
"|___ \ "
" __) |"
" |__ < "
" ___) |"
"|____/ "
)
"4" = @(
" _ _ "
"| || | "
"| || |_ "
"|__ _|"
" | | "
" |_| "
)
"5" = @(
" _____ "
"| ____|"
"| |__ "
"|___ \ "
" ___) |"
"|____/ "
)
"6" = @(
" __ "
" / / "
" / /_ "
"| '_ \ "
"| (_) |"
" \___/ "
)
"7" = @(
" ______ "
"|____ |"
" / / "
" / / "
" / / "
" /_/ "
)
"8" = @(
" ___ "
" / _ \ "
"| (_) |"
" > _ < "
"| (_) |"
" \___/ "
)
"9" = @(
" ___ "
" / _ \ "
"| (_) |"
" \__, |"
" / / "
" /_/ "
)
"." = @(
" "
" "
" "
" "
" _ "
"(_)"
)
"v" = @(
" "
" "
"__ __"
"\ \ / /"
" \ V / "
" \_(_)"
)
"p" = @(
" _____ _ "
"| __ \ (_) "
"| |__) | __ _____ ___ _____ __"
"| ___/ '__/ _ \ \ / / |/ _ \ \ /\ / /"
"| | | | | __/\ V /| | __/\ V V / "
"|_| |_| \___| \_/ |_|\___| \_/\_/ "
)
"d" = @(
" _____ "
"| __ \ "
"| | | | _____ __"
"| | | |/ _ \ \ / /"
"| |__| | __/\ V / "
"|_____/ \___| \_(_)"
)
"a" = @(
" _ _____ __ _____ _ _ _ _ _ "
" /\ | | / ____| / _| / ____(_) | | | | | | | "
" / \ | | ______| | __ ___ | |_ ___ _ __ | | __ _| |_| |__| |_ _| |__ "
" / /\ \ | | |______| | |_ |/ _ \ | _/ _ \| '__| | | |_ | | __| __ | | | | '_ \ "
" / ____ \| |____ | |__| | (_) | | || (_) | | | |__| | | |_| | | | |_| | |_) | "
"/_/ \_\______| \_____|\___/ |_| \___/|_| \_____|_|\__|_| |_|\__,_|_.__/ "
)
}

0..5 | ForEach-Object {
$line = $_
$str.ToCharArray() | ForEach-Object {
if ($chars.Keys -contains $_) {
$ch = $chars."$_"
Write-Host -noNewline $ch[$line]
$lines = $chars."a".Count
for ($line = 0; $line -lt $lines; $line++) {
foreach ($ch in $str.ToCharArray()) {
if ($chars.Keys -contains $ch) {
$bigCh = $chars."$ch"
Write-Host -noNewline $bigCh[$line]
}
}
Write-Host
}
Write-Host
}
}
Loading

0 comments on commit a26f554

Please sign in to comment.