Skip to content

Commit f2666b7

Browse files
committed
add architectures param to filter out arm64
1 parent 6ca1035 commit f2666b7

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

scripts/debian/aptly.sh

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,25 @@ check_required jq
2828
function start_aptly() {
2929
local __distribution=$1
3030
local __debs=$2
31-
local __background=$3
32-
local __clean=$4
33-
local __component=$5
31+
local __arch=$3
32+
local __background=$4
33+
local __clean=$5
34+
local __component=$6
3435
local __repo="${__distribution}"-"${__component}"
35-
local __port=$6
36-
local __wait=$7
36+
local __port=$7
37+
local __wait=$8
3738

3839
if [ "${__clean}" = 1 ]; then
3940
rm -rf ~/.aptly
4041
fi
4142

42-
aptly repo create -component "${__component}" -distribution "${__distribution}" "${__repo}"
43+
aptly repo create -component "${__component}" -distribution "${__distribution}" -architectures "${__archs}" "${__repo}"
4344

44-
aptly repo add "${__repo}" "${__debs}"
45+
aptly repo add -architectures "${__archs}" "${__repo}" "${__debs}"
4546

46-
aptly snapshot create "${__component}" from repo "${__repo}"
47+
aptly snapshot create -architectures "${__archs}" "${__component}" from repo "${__repo}"
4748

48-
aptly publish snapshot -distribution="${__distribution}" -skip-signing "${__component}"
49+
aptly publish snapshot -architectures "${__archs}" -distribution "${__distribution}" -skip-signing "${__component}"
4950

5051
if [ "${__background}" = 1 ]; then
5152
aptly serve -listen 0.0.0.0:"${__port}" &
@@ -101,6 +102,7 @@ function start(){
101102
local __background=0
102103
local __clean=0
103104
local __component="unstable"
105+
local __archs="amd64"
104106
local __port=$PORT
105107
local __wait=0
106108

@@ -127,6 +129,10 @@ function start(){
127129
__debs=${2:?$error_message}
128130
shift 2;
129131
;;
132+
-a | --archs )
133+
__archs=${2:?$error_message}
134+
shift 2;
135+
;;
130136
-m | --component )
131137
__component=${2:?$error_message}
132138
shift 2;
@@ -149,6 +155,7 @@ function start(){
149155

150156
start_aptly $__distribution \
151157
$__debs \
158+
$__archs \
152159
$__background \
153160
$__clean \
154161
$__component \

0 commit comments

Comments
 (0)