Compare commits

...

2 Commits

3 changed files with 34 additions and 30 deletions
Split View
  1. +5
    -1
      .gitlab-ci.yml
  2. +27
    -27
      Makefile
  3. +2
    -2
      libmpdel.el

+ 5
- 1
.gitlab-ci.yml View File

@ -1,9 +1,13 @@
image: ubuntu:latest
.test_job_template: &test_job_definition
variables:
PACKAGE_TEST_ARCHIVES: "melpa"
PACKAGE_TEST_DEPS: "package-lint"
script:
- emacs --version
- make ci-dependencies
- make install
- make check
test:emacs:25.1:


+ 27
- 27
Makefile View File

@ -1,43 +1,43 @@
SRCS = libmpdel.el
TESTS = test/libmpdel-test.el
LOAD_PATH = -L . -L ../package-lint
export PACKAGE_FILE=$(word 1,$(SRCS))
export PACKAGE_LISP=$(SRCS) $(TESTS)
export PACKAGE_TESTS=$(TESTS)
EMACSBIN ?= emacs
BATCH = $(EMACSBIN) -Q --batch $(LOAD_PATH) \
--eval "(setq load-prefer-newer t)" \
--eval "(require 'package)" \
--eval "(add-to-list 'package-archives '(\"melpa-stable\" . \"http://stable.melpa.org/packages/\"))" \
export PACKAGE_TEST_DEPS
export PACKAGE_TEST_ARCHIVES
EMAKE_PATH = ../emake
LOAD_PATH = -L . -L $(EMAKE_PATH) -L ../package-lint
EMAKE := emacs -Q --batch $(LOAD_PATH) -l emake.el \
--eval "(setq enable-dir-local-variables nil)" \
--funcall package-initialize
--eval "(emake (pop argv))"
.PHONY: all ci-dependencies check test lint
.PHONY: all install check test lint
all: check
ci-dependencies:
# Install dependencies in ~/.emacs.d/elpa
$(BATCH) \
--funcall package-refresh-contents \
--eval "(package-install 'package-lint)"
install: emake.el
@$(EMAKE) install
emake.el:
@test -f $(EMAKE_PATH)/emake.el || \
curl -fsSkL --retry 9 --retry-delay 9 -O \
'https://raw.githubusercontent.com/vermiculus/emake.el/master/emake.el'
check: lint test
test:
$(BATCH) --eval "(progn\
(load-file \"test/libmpdel-test.el\")\
(ert-run-tests-batch-and-exit))"
test: emake.el
@$(EMAKE) test ert
lint :
lint: emake.el
# Byte compile all and stop on any warning or error
$(BATCH) \
--eval "(setq byte-compile-error-on-warn t)" \
-f batch-byte-compile ${SRCS} ${TESTS}
@$(EMAKE) compile ~error-on-warn
# Run checkdoc to check Emacs Lisp conventions
@$(EMAKE) test checkdoc
# Run package-lint to check for packaging mistakes
$(BATCH) \
--eval "(require 'package-lint)" \
-f package-lint-batch-and-exit ${SRCS}
# Run checkdoc to check Emacs Lisp conventions
$(BATCH) --eval "(mapcar #'checkdoc-file '($(patsubst %, \"%\", ${SRCS})))"
@PACKAGE_LISP="$(SRCS)" $(EMAKE) test package-lint

+ 2
- 2
libmpdel.el View File

@ -520,7 +520,7 @@ Transform each entity to a string with TRANSFORMER,
(gethash entity-string map))))
(defun libmpdel-completing-read-entity (function prompt entity &optional transformer)
"Call FUNCTION after prompting for an element of ENTITY.
"Call FUNCTION after prompting with PROMPT for an element of ENTITY.
Pass PROMPT, the elements of ENTITY and TRANSFORMER to
`libmpdel-completing-read'."
@ -784,7 +784,7 @@ ENTITY can also be a list of entities to add.")
entities))
(defun libmpdel-playlist-replace (entity playlist)
"Clear PLAYLIST and add ENTITY to it."
"Add ENTITY to PLAYLIST after clearing it."
(libmpdel-playlist-clear playlist)
(libmpdel-playlist-add entity playlist))


Loading…
Cancel
Save