forked from melpa/melpa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-ci.sh
executable file
·34 lines (27 loc) · 1.28 KB
/
run-ci.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -eo pipefail
exec 2>&1
cd "$(dirname "$0")"
EMACS=${EMACS:-$(command -v emacs)}
echo "*** Emacs version ***"
echo "EMACS = $EMACS"
"$EMACS" --version
echo
changed_recipes=$(echo "$CHANGED_FILES" | (grep -Po '(?<=^recipes/)[a-z0-9].*' || true))
for recipe_name in $changed_recipes; do
if [ -f "./recipes/$recipe_name" ]; then
echo "----------------------------------------------------"
echo "Building new/modified recipe: $recipe_name"
emacs --batch --eval "(let ((debug-on-error t)) (add-to-list 'load-path \"$PWD/package-build/\")(load-file \"package-build/package-build.el\")(package-build-archive \"$recipe_name\"))"
fi
done
# if the tooling in ./package-build changed test a couple 'interesting' recipes:
changed_tooling=$(echo "$CHANGED_FILES" | (grep -Po '(?<=^package-build/)[a-z0-9].*' || true))
if [ -n "$changed_tooling" ]; then
for recipe_name in "evil" "kanban" "magit"; do
echo "----------------------------------------------------"
echo "Building recipe to test build tooling: $recipe_name"
emacs --batch --eval "(let ((debug-on-error t)) (add-to-list 'load-path \"$PWD/package-build/\")(load-file \"package-build/package-build.el\")(package-build-archive \"$recipe_name\"))"
done
fi
echo "Build successful"