Skip to content

Commit a26f554

Browse files
bcbuild-github-agentmicrosoft
and
microsoft
authored
Deploying AL-Go from main (37e4e3fac9276ad13dc998d03f7bf0fdad577d19) to main (#16)
Deploying AL-Go from main (37e4e3fac9276ad13dc998d03f7bf0fdad577d19) to main Co-authored-by: microsoft <[email protected]>
1 parent 2402ac5 commit a26f554

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2048
-1552
lines changed

AL-Go-Helper.ps1

+459-355
Large diffs are not rendered by default.

AL-Go-TestRepoHelper.ps1

+142-141
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function Test-Shell {
4343
}
4444
}
4545

46-
function Test-Json {
46+
function Test-SettingsJson {
4747
Param(
4848
[hashtable] $json,
4949
[string] $settingsDescription,
@@ -59,7 +59,8 @@ function Test-Json {
5959
Test-Property -settingsDescription $settingsDescription -json $json -key 'templateUrl' -should
6060
}
6161
if ($type -eq 'Project') {
62-
# Test for things that should / should not exist in a project settings file
62+
# GitHubRunner should not be in a project settings file (only read from repo or workflow settings)
63+
Test-Property -settingsDescription $settingsDescription -json $json -key 'githubRunner' -shouldnot
6364
}
6465
if ($type -eq 'Workflow') {
6566
# Test for things that should / should not exist in a workflow settings file
@@ -71,8 +72,9 @@ function Test-Json {
7172
# templateUrl should not be in Project or Workflow settings
7273
Test-Property -settingsDescription $settingsDescription -json $json -key 'templateUrl' -maynot
7374

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

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

117119
function Test-ALGoRepository {
118120
Param(
119-
[string] $baseFolder
121+
[string] $baseFolder = $ENV:GITHUB_WORKSPACE
120122
)
121-
123+
122124
if ($ENV:ALGoOrgSettings) {
123125
Write-Host "Checking AL-Go Org Settings variable (ALGoOrgSettings)"
124126
Test-JsonStr -jsonStr "$ENV:ALGoOrgSettings" -settingsDescription 'ALGoOrgSettings variable' -type 'Variable'
@@ -149,141 +151,140 @@ function Test-ALGoRepository {
149151
}
150152

151153
function Write-Big {
152-
Param(
153-
[string] $str
154-
)
155-
$chars = @{
156-
"0" = @'
157-
___
158-
/ _ \
159-
| | | |
160-
| | | |
161-
| |_| |
162-
\___/
163-
'@.Split("`n")
164-
"1" = @'
165-
__
166-
/_ |
167-
| |
168-
| |
169-
| |
170-
|_|
171-
'@.Split("`n")
172-
"2" = @'
173-
___
174-
|__ \
175-
) |
176-
/ /
177-
/ /_
178-
|____|
179-
'@.Split("`n")
180-
"3" = @'
181-
____
182-
|___ \
183-
__) |
184-
|__ <
185-
___) |
186-
|____/
187-
'@.Split("`n")
188-
"4" = @'
189-
_ _
190-
| || |
191-
| || |_
192-
|__ _|
193-
| |
194-
|_|
195-
'@.Split("`n")
196-
"5" = @'
197-
_____
198-
| ____|
199-
| |__
200-
|___ \
201-
___) |
202-
|____/
203-
'@.Split("`n")
204-
"6" = @'
205-
__
206-
/ /
207-
/ /_
208-
| '_ \
209-
| (_) |
210-
\___/
211-
'@.Split("`n")
212-
"7" = @'
213-
______
214-
|____ |
215-
/ /
216-
/ /
217-
/ /
218-
/_/
219-
'@.Split("`n")
220-
"8" = @'
221-
___
222-
/ _ \
223-
| (_) |
224-
> _ <
225-
| (_) |
226-
\___/
227-
'@.Split("`n")
228-
"9" = @'
229-
___
230-
/ _ \
231-
| (_) |
232-
\__, |
233-
/ /
234-
/_/
235-
'@.Split("`n")
236-
"." = @'
237-
238-
239-
240-
241-
_
242-
(_)
243-
'@.Split("`n")
244-
"v" = @'
245-
246-
247-
__ __
248-
\ \ / /
249-
\ V /
250-
\_(_)
251-
'@.Split("`n")
252-
"p" = @'
253-
_____ _
254-
| __ \ (_)
255-
| |__) | __ _____ ___ _____ __
256-
| ___/ '__/ _ \ \ / / |/ _ \ \ /\ / /
257-
| | | | | __/\ V /| | __/\ V V /
258-
|_| |_| \___| \_/ |_|\___| \_/\_/
259-
'@.Split("`n")
260-
"d" = @'
261-
_____
262-
| __ \
263-
| | | | _____ __
264-
| | | |/ _ \ \ / /
265-
| |__| | __/\ V /
266-
|_____/ \___| \_(_)
267-
'@.Split("`n")
268-
"a" = @'
269-
_ _____ __ _____ _ _ _ _ _
270-
/\ | | / ____| / _| / ____(_) | | | | | | |
271-
/ \ | | ______| | __ ___ | |_ ___ _ __ | | __ _| |_| |__| |_ _| |__
272-
/ /\ \ | | |______| | |_ |/ _ \ | _/ _ \| '__| | | |_ | | __| __ | | | | '_ \
273-
/ ____ \| |____ | |__| | (_) | | || (_) | | | |__| | | |_| | | | |_| | |_) |
274-
/_/ \_\______| \_____|\___/ |_| \___/|_| \_____|_|\__|_| |_|\__,_|_.__/
275-
'@.Split("`n")
276-
}
277-
154+
Param(
155+
[string] $str
156+
)
157+
$chars = @{
158+
"0" = @(
159+
" ___ "
160+
" / _ \ "
161+
"| | | |"
162+
"| | | |"
163+
"| |_| |"
164+
" \___/ "
165+
)
166+
"1" = @(
167+
" __ "
168+
"/_ |"
169+
" | |"
170+
" | |"
171+
" | |"
172+
" |_|"
173+
)
174+
"2" = @(
175+
" ___ "
176+
"|__ \ "
177+
" ) |"
178+
" / / "
179+
" / /_ "
180+
"|____|"
181+
)
182+
"3" = @(
183+
" ____ "
184+
"|___ \ "
185+
" __) |"
186+
" |__ < "
187+
" ___) |"
188+
"|____/ "
189+
)
190+
"4" = @(
191+
" _ _ "
192+
"| || | "
193+
"| || |_ "
194+
"|__ _|"
195+
" | | "
196+
" |_| "
197+
)
198+
"5" = @(
199+
" _____ "
200+
"| ____|"
201+
"| |__ "
202+
"|___ \ "
203+
" ___) |"
204+
"|____/ "
205+
)
206+
"6" = @(
207+
" __ "
208+
" / / "
209+
" / /_ "
210+
"| '_ \ "
211+
"| (_) |"
212+
" \___/ "
213+
)
214+
"7" = @(
215+
" ______ "
216+
"|____ |"
217+
" / / "
218+
" / / "
219+
" / / "
220+
" /_/ "
221+
)
222+
"8" = @(
223+
" ___ "
224+
" / _ \ "
225+
"| (_) |"
226+
" > _ < "
227+
"| (_) |"
228+
" \___/ "
229+
)
230+
"9" = @(
231+
" ___ "
232+
" / _ \ "
233+
"| (_) |"
234+
" \__, |"
235+
" / / "
236+
" /_/ "
237+
)
238+
"." = @(
239+
" "
240+
" "
241+
" "
242+
" "
243+
" _ "
244+
"(_)"
245+
)
246+
"v" = @(
247+
" "
248+
" "
249+
"__ __"
250+
"\ \ / /"
251+
" \ V / "
252+
" \_(_)"
253+
)
254+
"p" = @(
255+
" _____ _ "
256+
"| __ \ (_) "
257+
"| |__) | __ _____ ___ _____ __"
258+
"| ___/ '__/ _ \ \ / / |/ _ \ \ /\ / /"
259+
"| | | | | __/\ V /| | __/\ V V / "
260+
"|_| |_| \___| \_/ |_|\___| \_/\_/ "
261+
)
262+
"d" = @(
263+
" _____ "
264+
"| __ \ "
265+
"| | | | _____ __"
266+
"| | | |/ _ \ \ / /"
267+
"| |__| | __/\ V / "
268+
"|_____/ \___| \_(_)"
269+
)
270+
"a" = @(
271+
" _ _____ __ _____ _ _ _ _ _ "
272+
" /\ | | / ____| / _| / ____(_) | | | | | | | "
273+
" / \ | | ______| | __ ___ | |_ ___ _ __ | | __ _| |_| |__| |_ _| |__ "
274+
" / /\ \ | | |______| | |_ |/ _ \ | _/ _ \| '__| | | |_ | | __| __ | | | | '_ \ "
275+
" / ____ \| |____ | |__| | (_) | | || (_) | | | |__| | | |_| | | | |_| | |_) | "
276+
"/_/ \_\______| \_____|\___/ |_| \___/|_| \_____|_|\__|_| |_|\__,_|_.__/ "
277+
)
278+
}
278279

279-
0..5 | ForEach-Object {
280-
$line = $_
281-
$str.ToCharArray() | ForEach-Object {
282-
if ($chars.Keys -contains $_) {
283-
$ch = $chars."$_"
284-
Write-Host -noNewline $ch[$line]
280+
$lines = $chars."a".Count
281+
for ($line = 0; $line -lt $lines; $line++) {
282+
foreach ($ch in $str.ToCharArray()) {
283+
if ($chars.Keys -contains $ch) {
284+
$bigCh = $chars."$ch"
285+
Write-Host -noNewline $bigCh[$line]
286+
}
285287
}
288+
Write-Host
286289
}
287-
Write-Host
288-
}
289290
}

0 commit comments

Comments
 (0)