-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add two new functions:
elmpd-conn-status' and
elmpd-conn-failed-p'.
This patch adds two new utility functions for checking the status of an elmpd connection. In addition it tidies up several docstrings, and adds some utility scripts (under 'admin') for validating commits.
- Loading branch information
Showing
6 changed files
with
125 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ env.sh | |
*.bz2 | ||
*.gz | ||
*.xz | ||
*.zst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
# Configure the source tree, build it, test it, and test the distribution tarballs | ||
make distclean | ||
|
||
./bootstrap || exit 1 | ||
./configure || exit 1 | ||
make all || exit 1 | ||
if ! make check; then | ||
test -f test/test-suite.log && cat test/test-suite.log | ||
exit 1 | ||
fi | ||
make distcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# Run a few linters. This script is designed to be run either locally by the | ||
# developer, or as part of a Github action. | ||
|
||
EMACS=${EMACS:=emacs} | ||
PKGS="package-lint" | ||
LISP="elmpd.el" | ||
|
||
set -x | ||
|
||
# Shamelessly stolen from https://github.com/purcell/package-lint/blob/master/run-tests.sh: | ||
INIT_PACKAGE_EL="(progn \ | ||
(require 'package) \ | ||
(push '(\"melpa\" . \"https://melpa.org/packages/\") package-archives) \ | ||
(setq package-check-signature nil) \ | ||
(package-initialize) \ | ||
(package-refresh-contents) \ | ||
(dolist (pkg '(${PKGS})) \ | ||
(unless (package-installed-p pkg) \ | ||
(package-install pkg))))" | ||
|
||
"$EMACS" -Q -batch --eval "$INIT_PACKAGE_EL" | ||
|
||
# Check that there are no TODOs left laying around in the code | ||
find . -iname '*.el' -print0|xargs -0 -e grep -E 'TODO|TOOD|LATER|DEBUG|IN-PROGRESS|\\todo' && exit 1 | ||
|
||
set -e | ||
|
||
# This is a bit lame, since it will abort on the first error found for each | ||
# file, but checkdoc is not easy to run in batch mode. | ||
COLLECT_EL="(setq \ | ||
checkdoc-create-error-function \ | ||
(lambda (text start _end &optional _unfixable) \ | ||
(checkdoc-error start text) \ | ||
(kill-emacs 1)))" | ||
|
||
# run checkdoc | ||
for x in $LISP; do | ||
${EMACS} -Q -batch --eval "$INIT_PACKAGE_EL" --eval "$COLLECT_EL" --eval "(checkdoc-file \"$x\")" | ||
done | ||
|
||
# package-lint clean | ||
${EMACS} -Q -batch --eval "$INIT_PACKAGE_EL" --eval "(package-lint-batch-and-exit)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Run melpazoid against elmpd. This script is designed to be run exclusively | ||
# locally. | ||
|
||
set -ex | ||
|
||
cd ${HOME}/code/projects/melpazoid | ||
git pull | ||
PATH=/opt/emacsen/current/bin:$PATH \ | ||
RECIPE='(elmpd :repo "sp1ff/elmpd" :fetcher github :files ("*.el" (:exclude "elmpd-pkg.el" ".dir-locals.el" "*-tests.el")))' \ | ||
LOCAL_REPO="${HOME}/code/projects/elmpd" \ | ||
python3 melpazoid/melpazoid.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Validate that this source tree is ready to push. This script is designed to | ||
# be run exclusively locally. | ||
|
||
# Shamelessly stolen from: <https://gist.github.com/dhh/c5051aae633ff91bc4ce30528e4f0b60> | ||
set -e | ||
SECONDS=0 | ||
SHA=$(git rev-parse HEAD) | ||
|
||
GREEN=32; RED=31; BLUE=34 | ||
announce() { echo -e "\033[0;$2m$1\033[0m"; } | ||
run() { | ||
local SPLIT=$SECONDS | ||
announce "\nRun $1" $BLUE | ||
eval "$1" | ||
local INTERVAL=$((SECONDS-SPLIT)) | ||
announce "Completed $1 in $INTERVAL seconds" $GREEN | ||
} | ||
|
||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Can't sign-off on a dirty repository:" >&2 | ||
git status | ||
exit 1 | ||
fi | ||
|
||
announce "Attempting sign-off on elmpd $SHA." $GREEN | ||
|
||
run "admin/run-linters" | ||
run "admin/run-melpazoid" | ||
run "admin/configure-to-distcheck" | ||
|
||
announce "Signed off on elmpd $SHA in $SECONDS seconds 🍻" $GREEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters