Move dev package list to function

This commit is contained in:
Mike Roberts 2020-10-28 22:12:40 +00:00
parent 93bf571de0
commit 8f1b65a4d2
No known key found for this signature in database
GPG key ID: B68562622B45F745
2 changed files with 17 additions and 12 deletions

View file

@ -13,7 +13,7 @@ inputs:
required: false
default: "./"
target_architectures:
description: Target architecture of Debian package to build
description: Target architectures to build for
required: false
default: ""
dpkg_buildpackage_opts:

27
main.js
View file

@ -130,21 +130,26 @@ async function main() {
["apt-get", "update"]
)
args = [
"apt-get", "install", "--no-install-recommends", "-y",
// General packaging stuff
"dpkg-dev",
"debhelper",
"lintian"
]
function getDevPackages() {
devPackages = [
// General packaging stuff
"dpkg-dev",
"debhelper",
"lintian"
]
// Used by pybuild
for (targetArchitecture in targetArchitectures) {
args.concat("libpython3.7-minimal:" + targetArchitecture)
// Used by pybuild
for (targetArchitecture in targetArchitectures) {
devPackages.concat("libpython3.7-minimal:" + targetArchitecture)
}
return devPackages
}
runDockerExecStep(
"Install development packages",
args
[
"apt-get", "install", "--no-install-recommends", "-y"
].concat(getDevPackages())
)
runDockerExecStep(