Compare commits

..

3 Commits

Author SHA1 Message Date
f5daac0d67 commitpkg: commit removal of obsolete arch 2020-05-28 20:12:33 +02:00
2484ea39a4 commitpkg: support are change when moving 2020-05-28 15:54:43 +02:00
9b222bdb83 commitpkg: rm old arch on change of arch
signpkg: tweak msg
2020-05-28 10:39:19 +02:00
2 changed files with 18 additions and 5 deletions

View File

@@ -26,7 +26,11 @@ get_path(){
}
prepare_commit(){
local dest="$1"
local dest="$1" to_rm="${2:-none}"
if [[ -d repos/$to_rm ]]; then
git rm -r repos/$to_rm
git commit -m "change of package arch"
fi
[[ -d repos/$dest ]] && git rm -r repos/$dest
[[ ! -d repos ]] && mkdir repos
[[ ! -d repos/$dest ]] && mkdir repos/$dest
@@ -101,6 +105,15 @@ commit_pkg(){
fi
}
get_rm_arch(){
local rm_arch='none'
case "$CARCH" in
'any') rm_arch="${REPO_DEST}-x86_64" ;;
'x86_64') rm_arch="${REPO_DEST}-any" ;;
esac
echo $rm_arch
}
repo_commit_pkg(){
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
if [[ -n ${artixpath} ]];then
@@ -124,7 +137,7 @@ repo_commit_pkg(){
local action='add'
local dest="${REPO_DEST}-$CARCH"
prepare_commit "$dest"
prepare_commit "$dest" "$(get_rm_arch)"
cp trunk/* repos/$dest/
else
@@ -132,7 +145,7 @@ repo_commit_pkg(){
local src="${REPO_SRC}-$CARCH" dest="${REPO_DEST}-$CARCH"
[[ ! -f repos/$src/PKGBUILD ]] && die "%s does not exist!" "repos/$src/PKGBUILD"
prepare_commit "$dest"
prepare_commit "$dest" "$(get_rm_arch)"
cp repos/$src/* repos/$dest/
git rm -r repos/$src

View File

@@ -29,7 +29,7 @@ sign_pkg(){
fi
if [[ -n "${BUILDBOT_GPGP}" ]]; then
msg2 "Signing [%s]" "${file_to_sign##*/}"
msg "Signing [%s]" "${file_to_sign##*/}"
gpg --batch --passphrase "${BUILDBOT_GPGP}" --detach-sign "$file_to_sign"
else
msg2 "Signing [%s] with key %s" "${file_to_sign##*/}" "${GPGKEY}..."
@@ -39,7 +39,7 @@ sign_pkg(){
for pkg in ${passfiles[@]}; do
if pkgfile=$(find_cached_pkgfile "$pkg");then
msg "Found: %s" "${pkgfile}"
msg2 "Found: %s" "${pkgfile}"
[[ -e "${pkgfile}".sig ]] && rm "${pkgfile}".sig
sign_pkg "${pkgfile}"
fi