Commit fcf15d7e authored by Olav Morken's avatar Olav Morken
Browse files

upload.sh: Automatically detect distros

Instead of listing each distribution, check what distributions we have
packages for in the output directory and upload those.
parent 5d132892
......@@ -15,13 +15,13 @@ apt-get install -y openssh-client
)
# Upload the Debian packages
ssh jenkins@apt.uninett.no mkdir -p \
/www/apt.uninett.no/htdocs/debian/pool/bullseye/main/binary-amd64/r/radsecproxy \
/www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/r/radsecproxy
scp output/bullseye/radsecproxy*.deb \
jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/bullseye/main/binary-amd64/r/radsecproxy/
scp output/buster/radsecproxy*.deb \
jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/r/radsecproxy/
for distro_dir in ./output/*; do
distro="$(basename "${distro_dir}")"
target_dir="/www/apt.uninett.no/htdocs/debian/pool/${distro}/main/binary-amd64/r/radsecproxy"
echo "Uploading packages for ${distro}"
ssh jenkins@apt.uninett.no mkdir -p "${target_dir}"
scp "${distro_dir}"/radsecproxy*.deb "jenkins@apt.uninett.no:${target_dir}/"
done
# Update the repository metadata
echo "Updating APT repository metadata"
ssh jenkins@apt.uninett.no /www/apt.uninett.no/bin/mkrepo.debian
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment