Skip to content

Commit

Permalink
Unset hardcoded defaults from repo management tool
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Mar 7, 2024
1 parent 5e4393d commit abd4f45
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tools/repository/repo
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash

# Drop Unsupported Releases
#
# Drop unsupported releases
drop_unsupported_releases() {

echo "Cleanup: dropping unsupported"

BUILD_FW=($(grep -rw config/distributions/*/support -ve 'eos' | cut -d"/" -f3))
REPO=($(aptly publish list -config="${CONFIG}" --raw | sed "s/. //g"))

Expand Down Expand Up @@ -47,7 +48,7 @@ for f in "${4}${2}"/*.deb; do
'Name (% '${name}'), $Version (='${version}'), $Architecture (='${arch}')' &> /dev/null
if [[ $? -ne 0 ]]; then
echo -e "Checking and adding \x1B[92m$name\x1B[0m to repository \x1B[92m$release $3\x1B[0m"
aptly repo add -force-replace=true -config="${CONFIG}" "${1}" "${f}" &> /dev/null
aptly repo add -config="${CONFIG}" "${1}" "${f}" &> /dev/null
fi

done
Expand Down Expand Up @@ -93,7 +94,10 @@ for release in "${distributions[@]}"; do

ADDING_PACKAGES="false"
# shellcheck disable=SC2207,2199
[[ " ${DISTROS[@]} " =~ " ${release} " ]] && ADDING_PACKAGES="true"
if [[ " ${DISTROS[@]} " =~ " ${release} " ]] ; then
echo "Adding: ${release}"
ADDING_PACKAGES="true"
fi

# let's drop from publish if exits
if [[ -n $(aptly publish list -config="${CONFIG}" -raw | awk '{print $(NF)}' | grep "${release}") ]]; then
Expand Down Expand Up @@ -146,7 +150,7 @@ for release in "${distributions[@]}"; do
mkdir -p ${2}/public/
sudo date +%s > ${2}/public/control
# publish
echo "Publishing ${release}"
echo "Publishing: ${release}"
aptly publish \
-acquire-by-hash \
-architectures="armhf,arm64,amd64,riscv64,i386,all" \
Expand Down Expand Up @@ -301,7 +305,7 @@ esac
input="output/debs-beta"
output="output/repository"
command="show"
releases="jammy,lunar,buster,bullseye,bookworm,sid"
releases=$(grep -rw config/distributions/*/support -ve 'eos' | cut -d"/" -f3 | xargs | sed -e 's/ /,/g')

help()
{
Expand Down

0 comments on commit abd4f45

Please sign in to comment.