release 1.3.2: suite paths only ~/src/taler-monitoring
This commit is contained in:
parent
5b56141014
commit
7e7299f170
13 changed files with 125 additions and 53 deletions
|
|
@ -72,13 +72,14 @@ cleanup_legacy() {
|
|||
done < <("$PODMAN_BIN" images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | grep -E 'localhost/koopa-taler-.*-test-apt' || true)
|
||||
}
|
||||
|
||||
# Prefer single suite tree: if both ~/src/koopa-admin-log and ~/koopa-admin-log are
|
||||
# full git clones, keep the newer (by HEAD commit time) and replace the older with a symlink.
|
||||
# Prefer single suite tree: ~/src/taler-monitoring vs ~/taler-monitoring
|
||||
# (legacy koopa-admin-log paths are not used). Keep the newer git clone; symlink the other.
|
||||
dedupe_suite_repos() {
|
||||
local a="$HOME/src/koopa-admin-log" b="$HOME/koopa-admin-log"
|
||||
local a="$HOME/src/taler-monitoring" b="$HOME/taler-monitoring"
|
||||
local ta tb
|
||||
[ "${APT_DEPLOY_DEDUPE_REPOS:-1}" = "1" ] || return 0
|
||||
if [ -d "$a/.git" ] && [ -d "$b/.git" ] && [ ! -L "$a" ] && [ ! -L "$b" ]; then
|
||||
if [ -d "$a/.git" ] && [ -d "$b/.git" ] && [ ! -L "$a" ] && [ ! -L "$b" ] \
|
||||
&& [ "$(readlink -f "$a" 2>/dev/null || echo "$a")" != "$(readlink -f "$b" 2>/dev/null || echo "$b")" ]; then
|
||||
ta=$(git -C "$a" log -1 --format=%ct 2>/dev/null || echo 0)
|
||||
tb=$(git -C "$b" log -1 --format=%ct 2>/dev/null || echo 0)
|
||||
echo "======== dedupe suite repos (both are git clones) ========"
|
||||
|
|
@ -94,17 +95,11 @@ dedupe_suite_repos() {
|
|||
mkdir -p "$(dirname "$a")"
|
||||
ln -sfn "$b" "$a"
|
||||
fi
|
||||
elif [ -d "$a/scripts/taler-monitoring" ] && [ -d "$b/scripts/taler-monitoring" ] \
|
||||
&& [ ! -d "$a/.git" ] && [ -d "$b/.git" ] && [ ! -L "$a" ]; then
|
||||
echo "remove non-git tree $a · symlink → $b"
|
||||
rm -rf "$a"
|
||||
elif [ -d "$a/.git" ] && [ ! -e "$b" ]; then
|
||||
ln -sfn "$a" "$b"
|
||||
elif [ -d "$b/.git" ] && [ ! -e "$a" ]; then
|
||||
mkdir -p "$(dirname "$a")"
|
||||
ln -sfn "$b" "$a"
|
||||
elif [ -d "$b/scripts/taler-monitoring" ] && [ -d "$a/scripts/taler-monitoring" ] \
|
||||
&& [ ! -d "$b/.git" ] && [ -d "$a/.git" ] && [ ! -L "$b" ]; then
|
||||
echo "remove non-git tree $b · symlink → $a"
|
||||
rm -rf "$b"
|
||||
ln -sfn "$a" "$b"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue