mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Drop repository for unsupported Releases
This commit is contained in:
@@ -1,5 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Drop Unsupported Releases
|
||||
#
|
||||
drop_unsupported_releases() {
|
||||
|
||||
BUILD_FW=($(grep -rw config/distributions/*/support -ve 'eos' | cut -d"/" -f3))
|
||||
REPO=($(aptly publish list -config="${CONFIG}" --raw | sed "s/. //g"))
|
||||
|
||||
DROP=()
|
||||
for i in "${REPO[@]}"; do
|
||||
skip=
|
||||
for j in "${BUILD_FW[@]}"; do
|
||||
[[ $i == $j ]] && { skip=1; break ; }
|
||||
done
|
||||
[[ -n $skip ]] || DROP+=("$i")
|
||||
done
|
||||
|
||||
# drop
|
||||
for i in "${DROP[@]}"; do
|
||||
aptly publish drop -config="${CONFIG}" "${i}"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# Adding package
|
||||
#
|
||||
# @arg $1 string component
|
||||
@@ -259,6 +284,8 @@ case $3 in
|
||||
;;
|
||||
|
||||
update)
|
||||
# remove old releases from publishing
|
||||
drop_unsupported_releases
|
||||
publishing "$1" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user