Compare commits

...

2 Commits

Author SHA1 Message Date
Alejandro R. Mosteo 440b95005c Check that direct dependencies exist 2021-09-16 16:40:27 +02:00
Alejandro R. Mosteo 64013fc279 Use alr test instead of alr build
This way, test actions will get executed when they are appropriate instead of a
plain build.
2021-09-16 16:40:16 +02:00
+24 -1
View File
@@ -6,6 +6,26 @@ trap 'echo "Interrupted" >&2 ; exit 1' INT
set -o errexit
set -o nounset
function check_dependencies_exist() {
for dep in $(alr with | tail +1); do
if [[ $dep =~ ([a-z0-9_]+)[^a-z0-9_] ]]; then # this should always match the crate name
local crate=${BASH_REMATCH[1]}
if alr list | cut -f1 -d' ' | grep -qw $crate; then
return 0 # found
else
echo "Direct dependency is unknown: $dep (crate name: $crate)"
return 1
fi
else
echo Could not identify dependency crate name in: $dep
return 1
fi
done
return 0
}
# See whats happening
git log --graph --decorate --pretty=oneline --abbrev-commit --all | head -30
@@ -38,7 +58,7 @@ for file in $CHANGES; do
continue
fi
if ! [ -f ./$file ]; then
if ! [ -f ./"$file" ]; then
echo Skipping deleted file: $file
continue
fi
@@ -76,6 +96,9 @@ for file in $CHANGES; do
alr show --solve --detail --external-detect $milestone
solution=$(alr show --solve --detail --external-detect $milestone)
# Check that no direct dependency is unknown
check_dependencies_exist()
# Skip on explicit unavailability
if alr show --system $milestone | grep -q 'Available when: False'; then
echo SKIPPING crate build: $milestone UNAVAILABLE on system