Add import into apt repository
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Thorsten Spille 2022-06-12 00:31:11 +02:00
parent 821dc50ecb
commit aa98a45336

18
builder
View File

@ -9,7 +9,7 @@ source environment
version=$1
package=python3
package_name=package
package_name=$package
echo "$(date) setting global vars..."
libc6_version=$( dpkg -s libc6 | grep Version | cut -d':' -f2 | cut -d' ' -f2 | cut -d'-' -f1)
@ -77,8 +77,22 @@ echo "$(date) building deb package..."
dpkg-deb --build $deb_package
rm -r $src_dir/$dl_name-$version
rm -r $build_dir/$deb_package
cp $build_dir/$deb_package.deb /root/
datetime=$(/bin/date "+%Y-%m-%d-%H%M")
for del in $(aptly repo search bashclub | grep $package_name | grep ${dpkg_arch}); do
aptly repo remove bashclub $package_name
done
aptly repo add bashclub $build_dir/$deb_package.deb
aptly snapshot create $datetime-bashclub from repo bashclub
aptly publish drop $(lsb_release -cs) debian
aptly publish snapshot -distribution="$(lsb_release -cs)" $datetime-bashclub debian
/bin/systemctl restart aptly.service
echo "Build succeeded! You can find the .deb package at: /root/$deb_package.deb"
exit 0