Skip to content

Commit 30f8d6e

Browse files
committed
Merge branch 'salt-key-D-error' of github.com:bertdawg76/salt into salt-key-D-error
2 parents 8f28170 + 6c66944 commit 30f8d6e

File tree

6 files changed

+67
-45
lines changed

6 files changed

+67
-45
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ name: CI
55
run-name: "CI (${{ github.event_name == 'pull_request' && format('pr: #{0}', github.event.number) || format('{0}: {1}', startsWith(github.event.ref, 'refs/tags') && 'tag' || 'branch', github.ref_name) }})"
66

77
on:
8-
push: {}
8+
push:
9+
branches:
10+
- 3006.x
11+
- 3007.x
12+
- master
913
pull_request:
1014
types:
1115
- labeled

.github/workflows/templates/layout.yml.jinja

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ run-name: "<{ workflow_name }> (${{ github.event_name == 'pull_request' && forma
1919
<%- block on %>
2020

2121
on:
22-
push: {}
22+
push:
23+
branches:
24+
- 3006.x
25+
- 3007.x
26+
- master
2327
pull_request:
2428
types:
2529
- labeled

pkg/windows/nsis/build_pkg.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ if ( Test-Path -Path "$INSTALLER_DIR\$installer_name" ) {
436436
} else {
437437
Write-Result "Failed" -ForegroundColor Red
438438
Write-Host "Failed to find $installer_name in installer directory"
439+
Write-Host "CMD:"
440+
Write-Host "`"$NSIS_BIN`" /DSaltVersion=$Version /DPythonArchitecture=$ARCH /DEstimatedSize=$estimated_size `"$INSTALLER_DIR\Salt-Minion-Setup.nsi`""
439441
exit 1
440442
}
441443

-81.7 KB
Binary file not shown.

pkg/windows/nsis/installer/helper_StrContains.nsh

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,56 @@
77
# Written by kenglish_hi
88
# Adapted from StrReplace written by dandaman32
99
#------------------------------------------------------------------------------
10+
11+
# Initialize variables
12+
Var /GLOBAL STR_HAYSTACK
13+
Var /GLOBAL STR_NEEDLE
14+
Var /GLOBAL STR_CONTAINS_VAR_1
15+
Var /GLOBAL STR_CONTAINS_VAR_2
16+
Var /GLOBAL STR_CONTAINS_VAR_3
17+
Var /GLOBAL STR_CONTAINS_VAR_4
18+
Var /GLOBAL STR_RETURN_VAR
19+
1020
!define StrContains "!insertmacro StrContains"
1121
!macro StrContains OUT NEEDLE HAYSTACK
1222
Push "${HAYSTACK}"
1323
Push "${NEEDLE}"
14-
Call StrContains
24+
!ifdef __UNINSTALL__
25+
Call un.StrContains
26+
!else
27+
Call StrContains
28+
!endif
1529
Pop "${OUT}"
1630
!macroend
17-
Function StrContains
1831

19-
# Initialize variables
20-
Var /GLOBAL STR_HAYSTACK
21-
Var /GLOBAL STR_NEEDLE
22-
Var /GLOBAL STR_CONTAINS_VAR_1
23-
Var /GLOBAL STR_CONTAINS_VAR_2
24-
Var /GLOBAL STR_CONTAINS_VAR_3
25-
Var /GLOBAL STR_CONTAINS_VAR_4
26-
Var /GLOBAL STR_RETURN_VAR
32+
!macro Func_StrContains un
33+
Function ${un}StrContains
2734

28-
Exch $STR_NEEDLE
29-
Exch 1
30-
Exch $STR_HAYSTACK
31-
# Uncomment to debug
32-
#MessageBox MB_OK 'STR_NEEDLE = $STR_NEEDLE STR_HAYSTACK = $STR_HAYSTACK '
33-
StrCpy $STR_RETURN_VAR ""
34-
StrCpy $STR_CONTAINS_VAR_1 -1
35-
StrLen $STR_CONTAINS_VAR_2 $STR_NEEDLE
36-
StrLen $STR_CONTAINS_VAR_4 $STR_HAYSTACK
35+
Exch $STR_NEEDLE
36+
Exch 1
37+
Exch $STR_HAYSTACK
38+
# Uncomment to debug
39+
#MessageBox MB_OK 'STR_NEEDLE = $STR_NEEDLE$\nSTR_HAYSTACK = $STR_HAYSTACK'
40+
StrCpy $STR_RETURN_VAR ""
41+
StrCpy $STR_CONTAINS_VAR_1 -1
42+
StrLen $STR_CONTAINS_VAR_2 $STR_NEEDLE
43+
StrLen $STR_CONTAINS_VAR_4 $STR_HAYSTACK
3744

38-
loop:
39-
IntOp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_1 + 1
40-
StrCpy $STR_CONTAINS_VAR_3 $STR_HAYSTACK $STR_CONTAINS_VAR_2 $STR_CONTAINS_VAR_1
41-
StrCmp $STR_CONTAINS_VAR_3 $STR_NEEDLE found
42-
StrCmp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_4 done
43-
Goto loop
45+
loop:
46+
IntOp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_1 + 1
47+
StrCpy $STR_CONTAINS_VAR_3 $STR_HAYSTACK $STR_CONTAINS_VAR_2 $STR_CONTAINS_VAR_1
48+
StrCmp $STR_CONTAINS_VAR_3 $STR_NEEDLE found
49+
StrCmp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_4 done
50+
Goto loop
4451

45-
found:
46-
StrCpy $STR_RETURN_VAR $STR_NEEDLE
47-
Goto done
52+
found:
53+
StrCpy $STR_RETURN_VAR $STR_NEEDLE
54+
Goto done
4855

49-
done:
50-
Pop $STR_NEEDLE # Prevent "invalid opcode" errors and keep the stack clean
51-
Exch $STR_RETURN_VAR
52-
FunctionEnd
56+
done:
57+
Pop $STR_NEEDLE # Prevent "invalid opcode" errors and keep the stack clean
58+
Exch $STR_RETURN_VAR
59+
FunctionEnd
60+
!macroend
61+
!insertmacro Func_StrContains ""
62+
!insertmacro Func_StrContains "un."

tools/ci.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ def workflow_config(
709709
gh_event: dict[str, Any] = {}
710710
config: dict[str, Any] = {}
711711
labels: list[tuple[str, str]] = []
712-
slugs: list[str] = []
712+
slugs: str | list[str] = []
713713

714714
ctx.info(f"{'==== environment ====':^80s}")
715715
ctx.info(f"{pprint.pformat(dict(os.environ))}")
@@ -746,17 +746,19 @@ def workflow_config(
746746

747747
if event_name != "pull_request" or "test:full" in [_[0] for _ in labels]:
748748
full = True
749-
requested_slugs = _environment_slugs(
750-
ctx,
751-
tools.utils.get_cicd_shared_context()["full-testrun-slugs"],
752-
labels,
753-
)
749+
slugs = os.environ.get("FULL_TESTRUN_SLUGS", "")
750+
if not slugs:
751+
slugs = tools.utils.get_cicd_shared_context()["full-testrun-slugs"]
754752
else:
755-
requested_slugs = _environment_slugs(
756-
ctx,
757-
tools.utils.get_cicd_shared_context()["pr-testrun-slugs"],
758-
labels,
759-
)
753+
slugs = os.environ.get("PR_TESTRUN_SLUGS", "")
754+
if not slugs:
755+
slugs = tools.utils.get_cicd_shared_context()["pr-testrun-slugs"]
756+
757+
requested_slugs = _environment_slugs(
758+
ctx,
759+
slugs,
760+
labels,
761+
)
760762

761763
ctx.info(f"{'==== requested slugs ====':^80s}")
762764
ctx.info(f"{pprint.pformat(requested_slugs)}")

0 commit comments

Comments
 (0)