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 required: false
default: "./" default: "./"
target_architectures: target_architectures:
description: Target architecture of Debian package to build description: Target architectures to build for
required: false required: false
default: "" default: ""
dpkg_buildpackage_opts: dpkg_buildpackage_opts:

13
main.js
View file

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