Files
mistralrs-package/script/publish-repo.sh
rob thijssen c598165f2d
Some checks failed
poll-upstream / check (push) Failing after 1s
refactor: restructure rpm repo path to distro/version/arch layout
Move from /var/www/rpm/mistralrs/fedora-43/x86_64/ to
/var/www/rpm/fedora/43/x86_64/ so the repo can host packages
from multiple projects under a conventional hierarchy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-24 09:17:05 +03:00

25 lines
670 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
RPM_DIR="${1:?usage: $0 <rpm-directory>}"
REMOTE_DIR="/var/www/rpm/fedora/43/x86_64"
# sign each rpm with the imported gpg key
for rpm in "${RPM_DIR}"/*.rpm; do
rpm --addsign "${rpm}"
done
install --directory --mode 700 ~/.ssh
echo "${RSYNC_SSH_KEY}" | install --mode 600 /dev/stdin ~/.ssh/id_ed25519
ssh-keyscan -H oolon.kosherinata.internal > ~/.ssh/known_hosts 2>/dev/null
rsync \
--archive \
--verbose \
--chmod D755,F644 \
"${RPM_DIR}/"*.rpm \
"${RSYNC_TARGET}:${REMOTE_DIR}/"
ssh "${RSYNC_TARGET}" "cd ${REMOTE_DIR} && createrepo_c --update ."
echo "Published $(ls ${RPM_DIR}/*.rpm | wc -l) RPMs"