Skip to content

Commit e36cdb8

Browse files
committed
Be sure to include the apt project in the build.
Also be sure to make files executable that should be.
1 parent d93ef7e commit e36cdb8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

build.ps1

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ $filesForMacPackage = @(
6666
'runcommandonset'
6767
)
6868

69+
# the list of files other than the binaries which need to be executable
70+
$filesToBeExecutable = @(
71+
'apt.dsc.resource.sh',
72+
'brew.dsc.resource.sh'
73+
)
74+
6975
function Find-LinkExe {
7076
try {
7177
# this helper may not be needed anymore, but keeping in case the install doesn't work for everyone
@@ -164,6 +170,7 @@ if (!$SkipBuild) {
164170
$windows_projects = @("pal", "registry", "reboot_pending", "wmi-adapter")
165171

166172
$macOS_projects = @("resources/brew")
173+
$linux_projects = @("resources/apt")
167174

168175
# projects are in dependency order
169176
$projects = @(
@@ -194,6 +201,10 @@ if (!$SkipBuild) {
194201
$projects += $macOS_projects
195202
}
196203

204+
if ($IsLinux) {
205+
$projects += $linux_projects
206+
}
207+
197208
$failed = $false
198209
foreach ($project in $projects) {
199210
## Build format_json
@@ -257,6 +268,16 @@ if (!$SkipBuild) {
257268

258269
Copy-Item "*.dsc.resource.json" $target -Force -ErrorAction Ignore
259270

271+
# be sure that the files that should be executable are executable
272+
if ($IsLinux -or $IsMacOS) {
273+
foreach ($exeFile in $filesToBeExecutable) {
274+
$exePath = "$target/$exeFile"
275+
if (test-path $exePath) {
276+
chmod +x $exePath
277+
}
278+
}
279+
}
280+
260281
} finally {
261282
Pop-Location
262283
}

0 commit comments

Comments
 (0)